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];
非常感谢。不过我还是选择了另一个答案,因为他的答案更完整,但我很感激!)