Latest 1.0.2
Homepage https://github.com/archerLj/LFActionSheet
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

An UIView works like UIActionSheet

image
image
image

It’s very easy to use ^_^
Just like this:

//**————-
// 1. use it with delegate.
// show the action sheet.

    LFActionSheet *sheet = [[LFActionSheet alloc] initWithMessage:@"message to show" cancelTitle:@"cancel button" otherTitles:@"First Button", @"Second Button",nil];
    [sheet setTitleColor:[UIColor redColor] forOtherTitleIndex:0];
    sheet.delegate = self;
    [sheet show];

// do something in the delegate method like this:

    -(void)lfActionSheet:(LFActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
         ...
     }

//**————-
// 2. use with block.

     LFActionSheet *sheet = [[LFActionSheet alloc] initWithMessage:@"message" cancelTitle:@"cancel" otherTitles:@"log out",nil];
     [sheet setTitleColor:[UIColor redColor] forOtherTitleIndex:0];
     [sheet showWithCompletion:^(NSInteger buttonIndex) {
        ...
      }];

//**————-
// 3. LFActionSheetTool.
this class is used to show some particular action sheets, like action sheet used to choose image.

now you can show a log out action sheet like this:

    [[LFActionSheetTool sharedInstance] showLogoutSheetWithMessage:@"Logout Message" completion:^{
       ...
    }];

and show a choose image action sheet like this:

      [[LFActionSheetTool sharedInstance] showChoseImageSheetWithAction:^(UIImage *selectedImage) {
          ... 
      }];

^_^ Wish u like use this.

Latest podspec

{
    "name": "LFActionSheet",
    "version": "1.0.2",
    "summary": "An UIView works like UIActionSheet",
    "homepage": "https://github.com/archerLj/LFActionSheet",
    "license": "MIT",
    "platforms": {
        "ios": "8.0"
    },
    "authors": {
        "archrLj": "[email protected]"
    },
    "source": {
        "git": "https://github.com/archerLj/LFActionSheet.git",
        "tag": "1.0.2"
    },
    "source_files": "LFActionSheet/*.{h,m}",
    "requires_arc": true,
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This