- (IBAction)singleTapAction:(id)sender
{
UIActionSheet *sheet = [[UIActionSheet alloc]init];
[sheet addButtonWithTitle:@"拍照"];
[sheet addButtonWithTitle:@"从相册选择"];
[sheet addButtonWithTitle:@"取消"];
[sheet setCancelButtonIndex:2];
[sheet setDelegate:self];
sheet.tag = 255;
[sheet showInView:self.view];
}
{
UIActionSheet *sheet = [[UIActionSheet alloc]init];
[sheet addButtonWithTitle:@"拍照"];
[sheet addButtonWithTitle:@"从相册选择"];
[sheet addButtonWithTitle:@"取消"];
[sheet setCancelButtonIndex:2];
[sheet setDelegate:self];
sheet.tag = 255;
[sheet showInView:self.view];
}
#pragma mark - actionsheet delegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
if (actionSheet.tag == 101) {
UIImagePickerController *pickController = [[UIImagePickerController alloc] init];
pickController.delegate = self;
[pickController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];