Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 有人知道这个对象的名称吗?(图内)_Objective C_Xcode - Fatal编程技术网

Objective c 有人知道这个对象的名称吗?(图内)

Objective c 有人知道这个对象的名称吗?(图内),objective-c,xcode,Objective C,Xcode,我正试图在我的程序中添加类似的内容,但我不知道它叫什么。 我说的是从Cocoa touch中弹出“照片库”“拍照或视频”“取消”的按钮。UIActionSheet类。它是一个UIAlertController样式UIAlertControllerStyleActionSheet。 您可以这样使用它: UIAlertController *aC = [UIAlertController alertControllerWithTitle:@"Title"

我正试图在我的程序中添加类似的内容,但我不知道它叫什么。


我说的是从Cocoa touch中弹出“照片库”“拍照或视频”“取消”的按钮。

UIActionSheet类。

它是一个
UIAlertController
样式
UIAlertControllerStyleActionSheet
。 您可以这样使用它:

UIAlertController *aC = [UIAlertController alertControllerWithTitle:@"Title"
                                                            message:@"Message"
                                                     preferredStyle:UIAlertControllerStyleActionSheet];

[aC addAction:[UIAlertAction actionWithTitle:@"Button 1"
                                       // Style can be default, destructive or cancel
                                       style:UIAlertActionStyleDefault
                                     handler:^(UIAlertAction *action) {
    // handler
}]];

// Add more actions (buttons) here if needed

// Assuming you're in your view controller,
// present the alert view controller like this:
[self presentViewController:aC animated:YES completion:nil];

非常感谢。不过我还是选择了另一个答案,因为他的答案更完整,但我很感激!)