Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Allow different behavior for directions, and hold after completion #59

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

gtg922r
Copy link

@gtg922r gtg922r commented Feb 3, 2014

The best way to demonstrate the point of these changes is to illustrate the final behavior:
swipechanges2

Allow different behavior for left or right swipe

  • Added thirdTrigger and fourthTrigger to allow different trigger point for right to left swiping (6a08db2). If unset, will just use firstTrigger and secondTrigger, respectively (cae4f3e)
  • Added rightDefaultColor to set a different defaultColor for the start of a right to left swipe. By default it will just use defaultColor (e35fc13, fee9a61)

Allow swipe cell to completion, but then continue to allow interaction

  • I wanted to be able to use MCSwipeTableViewCell to add a layer of interaction "below" the cell (either for editing functions, or additional detail).
  • MCSwipeTableViewCellModeExit no longer allow interaction with the cell or to swipe it back to the origin
  • MCSwipeTableViewCellModeSwitch obviously won't swipe to completion
  • Added a new mode MCSwipeTableViewCellModeHold to enable this behavior (see the gif above)

Add additional delegate callback that includes the state at the time of completion

  • Seems like a useful argument to add to the callback method. Don't want to break existing code, so added it as an extra method

Note about animation

  • The gif above also includes changes to the animations. Those aren't generic and are not included in a pull request. If you use only an icon, everything would work fine. If you use a full width uiview, then the animation is wrong.
  • If you want to accept this pull request, and I figure out a way to make the changes generic I'll follow up with another pull request

… Right to left swipes. Allows different behavior for Swiping Left or Right
* Default (when rightDefaultColor == nil) is to use the defaultColor
…t that allows swiping cell back, and does not make the view transparent
- Called same time as swipeTableViewCellDidEndSwiping, but passes state
 - Will default to first and second trigger
- And a minimum amount of cell to use to display view for left view and right view
- Previously was placing center of sliding view in-between the edge and the first trigger: now there is an option to use the edge of the view, which works better for large views
* typo in sliding view positioning
* Added property (defaults to YES) to enable/disable cell spring and damper on iOS 7.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant