gpt4 book ai didi

iphone - iOS 5 中是否有一种标准方法来像在联系人中那样进行删除确认?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:50:51 25 4
gpt4 key购买 nike

在 iOS 5 中是否有标准方式来显示删除确认,如此屏幕截图所示?

如果没有标准的方法,任何解决方案都可以。

delete confirmation

最佳答案

这是一个带有破坏性按钮集的 UIActionSheet。参见 the documentation .

例如

// Create the action sheet
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:@"Delete"
otherButtonTitles:nil];

...

- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
if (buttonIndex == actionSheet.destructiveButtonIndex) {
// Do the delete
}
}

关于iphone - iOS 5 中是否有一种标准方法来像在联系人中那样进行删除确认?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10787632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com