Skip to content

An extension of UIActionSheet that uses blocks, supports ARC and stays close to the bleeding edge of Objective-C

License

Notifications You must be signed in to change notification settings

NebulaFox/RBActionSheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBActionSheet

RBActionSheet is an extension of UIActionSheet that uses blocks instead of a delegate. The code compiles under Apple LLVM compiler 4.0 and above. It also requires the base SDK of iOS 5.0.

Example

[[RBActionSheet actionSheetWithTitle:@"An Awesome Titile"
                  cancelButtonTitile:@"Cancel"
              destructiveButtonTitle:@"Destroy"
                   otherButtonTitles:@[ @"Eleborate", @"Expand", @"Expelliarmus" ] // an array literal
                        clickedBlock:^( RBAlertView *alert, NSInterger buttonIndex )
									 {
										 switch ( buttonIndex )
										 {
											 case 0: // Awesome // cancel button
												 NSLog( @"Awesome" ); break;
											 case 1:
												 NSLog( @"Eleborate" ); break;
											 case 2:
												 NSLog( @"Expand" ); break;
											 case 3:
												 NSLog( @"Expelliarmus" ); break;
										 }
									 }
] showInView:self.view]; // just assuming this code is inside a view controller

About

An extension of UIActionSheet that uses blocks, supports ARC and stays close to the bleeding edge of Objective-C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published