草庐IT

UIAlertcontroller

全部标签

ios - 在 iPhone 上的弹出窗口中呈现 UIAlertController ActionSheet

我正在创建并呈现一个ActionSheet,如下所示:letalertController=UIAlertController(title:nil,message:nil,preferredStyle:.ActionSheet)alertController.modalPresentationStyle=.Popover//AddsomebuttonsalertController.popoverPresentationController?.delegate=selfalertController.popoverPresentationController?.barButtonIte

ios - 在 iPhone 上的弹出窗口中呈现 UIAlertController ActionSheet

我正在创建并呈现一个ActionSheet,如下所示:letalertController=UIAlertController(title:nil,message:nil,preferredStyle:.ActionSheet)alertController.modalPresentationStyle=.Popover//AddsomebuttonsalertController.popoverPresentationController?.delegate=selfalertController.popoverPresentationController?.barButtonIte

ios - 如何同时关闭 UIAlertController 和键盘?

我用UIAlertController创建了一个注册表单,并使用方法addTextFieldWithConfigurationHandler添加了一个文本字段。但是有一个小问题。当表单出现时,键盘和模态框会出现一个流畅的动画。关闭表单时,模态框先消失,然后键盘消失。这使得键盘突然向下坠落。如何让模态框和键盘优雅地消失?lazyvaralertController:UIAlertController={[weakself]inletalert=UIAlertController(title:"Alert",message:"Thisisademoalert",preferredStyle

ios - 如何同时关闭 UIAlertController 和键盘?

我用UIAlertController创建了一个注册表单,并使用方法addTextFieldWithConfigurationHandler添加了一个文本字段。但是有一个小问题。当表单出现时,键盘和模态框会出现一个流畅的动画。关闭表单时,模态框先消失,然后键盘消失。这使得键盘突然向下坠落。如何让模态框和键盘优雅地消失?lazyvaralertController:UIAlertController={[weakself]inletalert=UIAlertController(title:"Alert",message:"Thisisademoalert",preferredStyle

ios - 延迟后运行的 UIAlertAction 处理程序

我正在尝试将我的UIAlertViews更改为UIAlertControllers。我为它设置了这个Action:UIAlertAction*undoStopAction=[UIAlertActionactionWithTitle:@"UndoStop"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction*action){[selfundoStop];}];但是,处理程序直到操作被点击后大约一秒钟才会运行。有什么办法可以加快速度吗? 最佳答案 警报View的短暂延迟是正常的(不

ios - 延迟后运行的 UIAlertAction 处理程序

我正在尝试将我的UIAlertViews更改为UIAlertControllers。我为它设置了这个Action:UIAlertAction*undoStopAction=[UIAlertActionactionWithTitle:@"UndoStop"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction*action){[selfundoStop];}];但是,处理程序直到操作被点击后大约一秒钟才会运行。有什么办法可以加快速度吗? 最佳答案 警报View的短暂延迟是正常的(不

ios - 替代 iOS 9 的 UIAlertView?

UAlertView在iOS9及更高版本中已弃用。有什么替代方案?UIAlertView*new=[[UIAlertViewalloc]initWithTitle:@"Success"message:@"YourInAppPurchasesweresuccessfullyrestored"delegate:nilcancelButtonTitle:@"OK"otherButtonTitles:nil];[newshow]; 最佳答案 您可以使用此代码替换警报View:UIAlertController*alertController

ios - 替代 iOS 9 的 UIAlertView?

UAlertView在iOS9及更高版本中已弃用。有什么替代方案?UIAlertView*new=[[UIAlertViewalloc]initWithTitle:@"Success"message:@"YourInAppPurchasesweresuccessfullyrestored"delegate:nilcancelButtonTitle:@"OK"otherButtonTitles:nil];[newshow]; 最佳答案 您可以使用此代码替换警报View:UIAlertController*alertController

ios - 试图用未知的演示者解雇 UIAlertController

我的应用程序崩溃了,一定是因为UIAlertController。此问题仅发生在UIAlertController可用的iOS8.x上。奇怪的是,我的应用程序既不使用UIAlertViewController也不使用UIAlertView。报告告诉我:TryingtodismissUIAlertControllerwithunknownpresenter.这怎么会发生?我想过撤消由于摇动手势而显示的系统AlertView当提示或通用对话框仍在屏幕上时WebView被释放低电量提醒但这些案例中没有一个让我崩溃。崩溃日志告诉我的事实是,操作系统显示了一个将附加到我的应用程序窗口的Alert

ios - 试图用未知的演示者解雇 UIAlertController

我的应用程序崩溃了,一定是因为UIAlertController。此问题仅发生在UIAlertController可用的iOS8.x上。奇怪的是,我的应用程序既不使用UIAlertViewController也不使用UIAlertView。报告告诉我:TryingtodismissUIAlertControllerwithunknownpresenter.这怎么会发生?我想过撤消由于摇动手势而显示的系统AlertView当提示或通用对话框仍在屏幕上时WebView被释放低电量提醒但这些案例中没有一个让我崩溃。崩溃日志告诉我的事实是,操作系统显示了一个将附加到我的应用程序窗口的Alert