Is it possible to add an image to the buttons of the UIActionSheet as seen in UIDocumentInteractionController? If so, please let me know how it is
I just created a class emulating the look of an UIActionSheet using table cells supporting images and text for every row. It also uses blocks for interaction, supports iPhone and iPad, popup from an UITabBarItem on iPad and queueing of multiple sheets. Still in development, but feel free to clone it from Github:
http://github.com/azplanlos/SIActionSheet
Usage is quite simple, here is an example:
SIActionSheet* mySheet = [SIActionSheet actionSheetWithTitle:@"Action Sheet title"
andObjects:[NSArray arrayWithObjects:
[SIActionElement actionWithTitle:@"Item 1"
image:[UIImage imageNamed:@"image"]
andAction:^{NSLog(@"action 1");}]
, nil]
completition:^(int num) {
NSLog(@"pressed %i", num);
} cancel:^{NSLog(@"canceled");}];
mySheet.followUpSheet = anotherSheet;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[mySheet show];
else
[mySheet showFromTabBarItem:item inTabBar:tabBar];
If you encounter any problems, please let me know. I hope this helps a lot of people having the same problem like me...