Giter VIP home page Giter VIP logo

abmenutableviewcell's Introduction

ABMenuTableViewCell

Fully compatible with iOS 9

Highly customizable, yet simple to use, solution for UITableViewCell right menu, shown by 'swipe to delete' gesture.

Mail App Styled Menu - show & hide example:

Without any extra work needed, showing the right menu view works with default swipe-to-delete gesture. Also, hiding the menu is done using known gestures like tapping or swiping back.

Screenshot

Mail App Styled Menu - delete item example:

Deleting rows is as simple as the default implementation.

Screenshot

Custom Styled Menu - show, hide & delete example

The advantage of using custom menus is that you're not stuck with Apple style buttons and you can easily integrate your own design.

Screenshot

Integration

  • Install via cocoapods (just add pod 'ABMenuTableViewCell', '~> 2.0' to your Podfile), or clone this repository and drag the content of ABMenuTableViewCell folder to your project.
  • To use you just need to replace UITableViewCell with ABMenuTableViewCell and assign your custom menu view to rightMenuView property and you're ready to go! You can take a look at the following snippet for details.
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *identifier = @"ABMenuTableViewCell";
    ABMenuTableViewCell *cell = (ABMenuTableViewCell*)[tableView cellForRowAtIndexPath:indexPath];

    if (!cell) {
        cell = [[ABMenuTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    
    // use your own custom menu view
    UIView *menuView = [[UIView alloc] initWithFrame:CGRectMake(.0, .0, 160.0, 44.0)];
    menuView.backgroundColor = [UIColor redColor];

    cell.rightMenuView = menuView;
    cell.textLabel.text = @"Lorem ipsum dolor sit amet";

    return cell;
}

Requirements

  • iOS 7.x or newer
  • ARC
  • Xcode 6.x

Credits

ABMenuTableViewCell was created by Alex Bumbu.

License

ABMenuTableViewCell is available under the MIT license. See the LICENSE file for more info. For usage without attribution contact Alex Bumbu.

abmenutableviewcell's People

Contributors

alexbumbu avatar digabriel 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abmenutableviewcell's Issues

cell swipe issue

i created custom view and load in to tableview cell.. but sometimes cell will be not swipe.can u pls help me to solve this issue.

Weird behavior on iOS7.

I've used only the swipe to the left.
While everything works as expected on iOS8, on iOS7 I've noticed quite a weird behavior:
If I start by swiping to the right, it show an empty space on the left side, and the swipe to the left no longer shows the buttons.
If I start by swiping to the left, it works correctly, and the swipe to the right no longer shows an empty space (as expected).

Issue on ipad

Hello alexbumbu,
I have tested on ipad, and it not working.

TableViewCell Long press issue

Hi Alex,

I want you to thank you for this awesome library.

I want your help in solving one issue which I have encountered recently.
Long Pressing on Tableview cell disables the swipe to delete option from tableview cell.

It would be really great if you can help me in solving this issue.

Thanks

iOS13 CustomCell support

Good day!

Thank you for your work!

Help me please.
On iOS13, the swipe for the custom cell does not work correctly. Incorrect cell sizes after animation.
I can’t figure out how to fix this.

Best Regards!

Error: #import objc/objc-runtime.h file not found

The error happens when you try to archive the project in VisibleMenuCell category. The solution is to replace #import objc/objc-runtime.h for #import objc/runtime.h. @alexbumbu Do you want me to generate a new pull request with this solution? Do you have any other solution?

Thanks

Slider issue

Hi Alex,

We have tried integrating the ABMenu into our project. We find if we don't implement the UITableView:editActionsForRowAtIndexPath then the menu will not appear; however, this also means that the views for the actions appear underneath the menu too, which is not desirable. Also if we don't implement UITableView:editActionsForRowAtIndexPath, then the menu just floats on top of the cell or doesn't appear at all.

Any help would be appreciated, thanks in advance!

Best,

Beauro

About using custom cell in table view

Hi,This is not an issue but new upgrade in ABMenuTableViewCell

i just integrated AB cell Menu view custom style in my app . i need to use this library with custom cell.I tried as below in ABMenuTableViewCell file

@interface ABMenuTableViewCell : UITableViewCell

@Property (nonatomic, assign) UIView *rightMenuView;
@Property (strong, nonatomic) IBOutlet UILabel *lblInformationText;

@EnD

But it gives nothing in table view cell.Please help in this case.

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.