IOS UIActionSheet

来源:互联网 发布:延时摄影编辑软件 编辑:程序博客网 时间:2024/06/08 02:14

UIActionSheet *sheet = [[UIActionSheetalloc] initWithTitle:@"title"delegate:selfcancelButtonTitle:@"cancel"destructiveButtonTitle:@"destructive"otherButtonTitles:@"other",nil];

[sheet showInView:self.view];

#pragma mark - UIActionSheet Delegate

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex

{

   NSLog(@"index %d",buttonIndex);

}