Latest1.0.0
Homepagehttps://github.com/rsilva/RSActionSheet
LicenseMIT
Platformsios 5.0, requires ARC
Authors

RSActionSheet is a simple, block-based UIActionSheet wrapper.

Example

RSActionSheet* sheet = [[RSActionSheet alloc] initWithTitle:@"Example"];

[sheet addDestructiveButtonWithTitle:@"Delete Document" handler:^{
   [self deleteDocument];
}];

[sheet addButtonWithTitle:@"Do Thing 1" handler:^{
   NSLog(@"Do Thing 1 button pressed");
}];

[sheet addCancelButtonWithTitle:@"Cancel" handler:^{
   NSLog(@"Cancel button pressed");
}];

[sheet showInView:self.view];

Notes

By default, the button handler is called when the button is tapped, however this behavior can be changed by setting the following property:

typedef NS_ENUM(NSUInteger, RSActionSheetButtonHandlerType) {
   RSActionSheetButtonHandlerTypeTapped,
   RSActionSheetButtonHandlerTypeWillDismiss,
   RSActionSheetButtonHandlerTypeDidDismiss
};

// Default is RSActionSheetButtonHandlerTypeTapped
@property (assign, nonatomic) RSActionSheetButtonHandlerType buttonHandlerType

Lastly, the buttons are displayed in the order in which they are added — the first button added is the top button in the sheet.

Requirements

Creator

Rick Silva (@rjsmsu)

License

RSActionSheet is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RSActionSheet",
    "version": "1.0.0",
    "summary": "A simple, block-based UIActionSheet wrapper.",
    "homepage": "https://github.com/rsilva/RSActionSheet",
    "license": "MIT",
    "authors": {
        "Rick Silva": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rsilva/RSActionSheet.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "RSActionSheet/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This