因此,由于某种原因,在我刚刚添加了一个操作表之后,它会出现并停止在屏幕底部上方。有没有办法手动告诉这个在哪里停止?
- (void)showActionSheet:(UIButton *)standardButton{
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:nil otherButtonTitles:@"Choose From Library", @"Take Photo", nil];
popupQuery.actionSheetStyle = UIActionSheetStyleAutomatic;
[popupQuery showInView:self];
}
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
// Choose from library tapped
NSLog(@"Choose");
} else if (buttonIndex == 1) {
// Take a photo tapped
NSLog(@"Take");
}
}