草庐IT

UIAlertcontroller

全部标签

ios - 从 AppDelegate 呈现 UIAlertController

这个问题在这里已经有了答案:HowtopresentUIAlertControllerwhennotinaviewcontroller?(39个答案)关闭5年前。我正在尝试在我的iOS应用程序中显示来自AppDelegate的UIAlertController。以下是警报和当前方法。UIAlertController*alert=[UIAlertControlleralertControllerWithTitle:cTitlemessage:cMessagepreferredStyle:UIAlertControllerStyleAlert];//Configurealertandac

ios - 从 AppDelegate 呈现 UIAlertController

这个问题在这里已经有了答案:HowtopresentUIAlertControllerwhennotinaviewcontroller?(39个答案)关闭5年前。我正在尝试在我的iOS应用程序中显示来自AppDelegate的UIAlertController。以下是警报和当前方法。UIAlertController*alert=[UIAlertControlleralertControllerWithTitle:cTitlemessage:cMessagepreferredStyle:UIAlertControllerStyleAlert];//Configurealertandac

ios - 在 UIAlertController 中将图像添加到 UIAlertAction

我看过几个UIAlertControllers的屏幕截图,行的左侧有一个图像,但我没有在文档中看到它。视觉示例是这是我现在为我的Controller准备的代码:UIAlertController*view=[UIAlertControlleralertControllerWithTitle:@"MyTitle"message:@"SelectyouChoice"preferredStyle:UIAlertControllerStyleActionSheet];UIAlertAction*ok=[UIAlertActionactionWithTitle:@"OK"style:UIAler

ios - 在 UIAlertController 中将图像添加到 UIAlertAction

我看过几个UIAlertControllers的屏幕截图,行的左侧有一个图像,但我没有在文档中看到它。视觉示例是这是我现在为我的Controller准备的代码:UIAlertController*view=[UIAlertControlleralertControllerWithTitle:@"MyTitle"message:@"SelectyouChoice"preferredStyle:UIAlertControllerStyleActionSheet];UIAlertAction*ok=[UIAlertActionactionWithTitle:@"OK"style:UIAler

ios - 想在 UIAlertController 或 UIPopoverController Swift 中显示 UIPickerView?

我想在UIAlertController或UIPopoverController中显示UIPickerView,我是iOS新手,请给我一些示例代码。我搜索了它们,但找不到满意的答案。我不想在UIActionSheet上这样做,因为它在iOS9中已被弃用。我也希望它在Swift中而不是在Obj-C中。我尝试了以下示例,但它对我不起作用。http://makeapppie.com/2014/08/30/the-swift-swift-tutorials-adding-modal-views-and-popovers/ 最佳答案 您的基本

ios - 想在 UIAlertController 或 UIPopoverController Swift 中显示 UIPickerView?

我想在UIAlertController或UIPopoverController中显示UIPickerView,我是iOS新手,请给我一些示例代码。我搜索了它们,但找不到满意的答案。我不想在UIActionSheet上这样做,因为它在iOS9中已被弃用。我也希望它在Swift中而不是在Obj-C中。我尝试了以下示例,但它对我不起作用。http://makeapppie.com/2014/08/30/the-swift-swift-tutorials-adding-modal-views-and-popovers/ 最佳答案 您的基本

objective-c - 删除 UITableView 单元格之前发出警报 - (UIAlertController) Swift 或 Objective-C

我想删除一个TableView单元格,但在该操作发生之前我想给用户一个警告View。我明白了:-(void)tableView:(UITableView*)tableViewcommitEditingStyle:(UITableViewCellEditingStyle)editingStyleforRowAtIndexPath:(NSIndexPath*)indexPath{if(editingStyle==UITableViewCellEditingStyleDelete){UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"Wa

objective-c - 删除 UITableView 单元格之前发出警报 - (UIAlertController) Swift 或 Objective-C

我想删除一个TableView单元格,但在该操作发生之前我想给用户一个警告View。我明白了:-(void)tableView:(UITableView*)tableViewcommitEditingStyle:(UITableViewCellEditingStyle)editingStyleforRowAtIndexPath:(NSIndexPath*)indexPath{if(editingStyle==UITableViewCellEditingStyleDelete){UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"Wa

ios - 如何在全局swift中创建uialertcontroller

我正尝试在Config.swift文件中创建uialertcontroller,如下所示。staticfuncshowAlertMessage(titleStr:String,messageStr:String)->Void{letwindow:UIWindow?letalert=UIAlertController(title:titleStr,message:messageStr,preferredStyle:UIAlertControllerStyle.Alert);self.window!.presentViewController(alert,animated:true,com

ios - 如何在全局swift中创建uialertcontroller

我正尝试在Config.swift文件中创建uialertcontroller,如下所示。staticfuncshowAlertMessage(titleStr:String,messageStr:String)->Void{letwindow:UIWindow?letalert=UIAlertController(title:titleStr,message:messageStr,preferredStyle:UIAlertControllerStyle.Alert);self.window!.presentViewController(alert,animated:true,com