ios - 从 UIActionSheet 弹出窗口中删除填充

标签 ios ipad ios7

我正在创建一个 UIActionSheet 以允许用户拍摄或选择照片。有人能告诉我为什么它的显示与苹果的不一样吗?这是针对 iPad 的,所以我没有声明取消按钮。

UIActionSheet *actionSheet = [[UIActionSheet alloc] init];
actionSheet.delegate = self;
[actionSheet addButtonWithTitle:NSLocalizedString(@"choosePhotoPopoverButton", @"Choose Photo - Get a photo from the album.")];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
    [actionSheet addButtonWithTitle:NSLocalizedString(@"takePhotoPopoverButton", @"Take Photo - Use camera to take photo.")];
}
[actionSheet showFromRect:self.imageView.frame inView:self animated:YES];

Apple 的通讯录应用。利润率紧张。行与行之间的线。

enter image description here

我的工作应用示例。底部有额外的填充物。行与行之间没有线。

enter image description here

感谢您的任何见解。

最佳答案

试试这个

UIActionSheet *actionSheet;

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
    actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate: self cancelButtonTitle:@"" destructiveButtonTitle:nil otherButtonTitles:@"Take Photo",@"Camera", nil];
}else{
    actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate: self cancelButtonTitle:@"" destructiveButtonTitle:nil otherButtonTitles:@"Take Photo", nil];
}

[actionSheet showFromRect:self.imageView.frame inView:self animated:YES];

关于ios - 从 UIActionSheet 弹出窗口中删除填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20907395/

相关文章:

ios - 如何在 iOS 中解压缩文件并从中复制数据库?

ios - 如何在 Xcode8 上使用 Swift 2.2?

ios - 如何使 AVPlayer 和 AVPlayerLayer 可滚动(AVFoundation)

sql - iPad (iOS 3.2) 不支持 HTML5 readTransaction?

ios7 - UItextview 没有按预期扩展约束

game-center - GameKit GKMatchMaker inviteHandler 在 iOS7 中弃用,替代者是什么?

ios - 创建用于 AWS DynamoDB 的唯一主键

ios - 在哪里可以找到 iPad Pro 的建议视频比特率?

ios - 苹果设备可以处理 SceneKit 中的多少个顶点

iphone - ios 7 视频保存问题