iphone - 如何让底部的那些小 View 出现在 iOS SDK 中?

标签 iphone objective-c ios uiview uiviewcontroller

我说的是当您需要确认某项操作时底部带有按钮的小窗口。比如你想从相册中删除一张照片,按下垃圾桶图标,底部会跳出一个小 View ,询问你是要删除照片还是取消

如何显示这些 View ?

最佳答案

使用 UIActionSheet。

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Some Action"
                                           delegate:self 
                                  cancelButtonTitle:@"Cancel"
                             destructiveButtonTitle:@"OK"
                                  otherButtonTitles: nil];

actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
[actionSheet release];

关于iphone - 如何让底部的那些小 View 出现在 iOS SDK 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5575244/

相关文章:

ios - UITableView 返回奇怪的大小

iphone - 子类 MKAnnotationView

iphone - 如何使用幻灯片更改 UISlider 背景颜色

ios - iOS框架中的重复符号

ios - UILocalNotification唤醒了应用程序(事件)

objective-c - UIView动画随机

ios - 如何以编程方式为不同数量的 UIView 设置约束

iphone - 在 iPhone/iPad 故事书应用程序中使用 'pages' 的 UIImageViews?

ios - 更新应用程序时,iPhone 中的所有本地文件都会被删除

ios - 崩溃 : AVAudioSession Notify Thread in iOS