Giter VIP home page Giter VIP logo

dnsswipeabletablecell's People

Contributors

bcylin avatar bogdanbeczkowski avatar bryant1410 avatar designatednerd avatar krivoblotsky avatar markflowers avatar mergesort avatar orthographic-pedant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnsswipeabletablecell's Issues

DNSSwipeableTableCell interferes with interactivePopGestureRecognizer

I believe the panGesture recognizer is interrupting the interactivePopGestureRecognizer's abililty to pop and go back. I replaced a regular UITableViewCell with it, and it went back to working.

I believe the code responsible for it is inside - (void)panThisCell:(UIPanGestureRecognizer *)recognizer inside the UIGestureRecognizerStateChanged case, more specifically:

if (!panningLeft) {
                CGFloat constant = MAX(adjustment, 0);
                if (constant == 0) {
                    [self resetConstraintContstantsToZero:YES notifyDelegateDidClose:NO];
                } else {
                    self.contentViewRightConstraint.constant = constant;
                }
            } 

Thanks,
Joe

DNSSwipeableTableCell has when compiling against iOS 8

I'm working on finding the issue, but I'm having trouble so far. I've determined that the problem is with the myContentView property. When I add a subview to UITableViewCell's contentView property, everything looks fine (but obviously swiping does not work). When I add my subview and constrain it to myContentView, it ends up looking like this.
Example

Would it be possible to have you look into this? I'm working on it as well, but am having trouble figuring it out.

Thanks!

Storyboard support

Would be nice to truly have the option to create the the cell from storyboard.

iOS 8 Style Sliding

Want to add the following features for iOS 8 style stuff:

  • Slide from right to left that swipes off to the side to accomplish the rightmost task
  • Bouncy-sized buttons
  • Buttons slide out from under the rightmost button towards leftmost button

Can Swipe Cell While Scrolling

If you begin swiping a cell, you cannot scroll. That's great.

However, if you begin scrolling you can move horizontally which will cause a cell to begin to open and be a bit jumpy in its movement. I tested the same idea against the Mail app, and Apple has it pretty well locked down so there's no horizontal cell interaction while scrolling.

movingHorizontally BOOL problem

Translation is often == (0,0), so it's not precise - cell sometimes not move.
The (0,0) problem is not apparent when velocityInView: is used instead of translationInView.

Current code:
CGPoint currentPoint = [recognizer translationInView:self.myContentView];
//Check what direction the swipe is moving by checking the translation
BOOL movingHorizontally = fabsf(self.panStartPoint.y) < fabsf(self.panStartPoint.x);

Fix:
CGPoint movePoint = [recognizer velocityInView:self.myContentView];
BOOL movingHorizontally = fabsf(movePoint.y) < fabsf(movePoint.x);

Support for RTL languages

When adding support for swiping in either direction, I should make sure this also works in an RTL language.

closing other cells

Is it possible to close any other open cell as you slide a new cell open?

and have you an option for sliding the opposite way?

Setting cell.accessoryType

Setting:

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

Leaves the accessory chevron behind when the cell swipes and then when the cell returns leaves the Delete button visible behind the chevron.

numberOfButtonsInSwipeableCell: should be numberOfButtonsInSwipeableCell:index:

When using Apple's datasource/delegate pattern, and keeping them separate, if you have a variable number of buttons per cell (maybe some cells have 1 button, some have 2, some 3), it is impossible to tell which cell you are referring to in numberOfButtonsInSwipeableCell: without having the tableView to reference.

In the sample, it is done as so:
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:cell.center];

but if it was a true datasource, it would not need a reference to the tableView to know what index was the one being referred to.

In my code, I have a tableViewDataSource which is separate from the tableViewController (as it backs multiple different tableViewControllers), so it is currently impossible to figure out how many buttons to display depending on certain conditions of the items in my dataSource.

Otherwise, this control has been a gem, thanks so much!
Joe

Podspec update

Can you, please, update the podspec and submit the new pod version as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.