iflyingboots / XWActionSheet

Yet another action sheet for iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XWActionSheet

Yet another action sheet for iOS.

Demo

Installation

Add XWActionSheetView.h and XWActionSheetView.m files to your project.

Usage

Firstly, import: #import "XWActionSheetView.h"

Secondly, create an action sheet by:

XWActionSheetView *actionSheet = [[XWActionSheetView alloc] initWithTitles:@[@"椰子鸡", @"炸猪排", @"重庆火锅"]];
// Optional
actionSheet.caption = @"今天吃什么";

Then, show this view by:

[actionSheet show];

Finally, monitor actions by:

[actionSheet observeTapEventWithHandler:^(NSUInteger index, NSString *title, XWActionSheetItemType type) {
    // do something with this info
}];

Demo

Kindly find XWActionSheet.xcodeproj project.

License

The MIT license.

About

Yet another action sheet for iOS.

License:MIT License


Languages

Language:Objective-C 100.0%