草庐IT

uialertController

全部标签

iphone - Swift UIAlertController -> ActionSheet iPad iOS8 崩溃

目前我的ActionSheet遇到了大麻烦。在iPhone上运行良好,但在iPad上它只会崩溃我创建一个只有一个按钮的新项目importUIKitextensionViewController:UIActionSheetDelegate{funcactionSheet(actionSheet:UIActionSheet,didDismissWithButtonIndexbuttonIndex:Int){ifactionSheet.tag==0{ifbuttonIndex==1{//doingsomethingfor"productpage"}elseif(buttonIndex==2)

ios - 如何在 Swift 中将 TextField 添加到 UIAlertController

我正在尝试显示一个带有UITextView的UIAlertController。当我添加行时://AddtextfieldalertController.addTextFieldWithConfigurationHandler{(textField)->Voidin}我收到一个运行时错误:fatalerror:unexpectedlyfoundnilwhileunwrappinganOptionalvalueletalertController:UIAlertController=UIAlertController(title:"Findimage",message:"Searchfo

objective-c - UIAlertController:supportedInterfaceOrientations 被递归调用

当两个警报一一出现时,我的意思是一个警报出现,另一个警报出现并且应用程序崩溃。我使用UIAlertController来显示警报。应用程序仅在iOS9设备中崩溃。此时请帮助我。 最佳答案 这是iOS9中的一个错误,它无法检索UIAlertController的supportedInterfaceOrientations。在寻找UIAlertController的supportedInterfaceOrientations时,它似乎陷入了无限递归循环(例如,它回溯到UIAlertControler->UIViewController-

ios - UIAlertController 自定义字体、大小、颜色

我正在使用新的UIAlertController来显示警报。我有这个代码://niltitlesbreakalertinterfaceoniOS8.0,sowe'llbeusingemptystringsUIAlertController*alert=[UIAlertControlleralertControllerWithTitle:title==nil?@"":titlemessage:messagepreferredStyle:UIAlertControllerStyleAlert];UIAlertAction*defaultAction=[UIAlertActionaction

ios - 如何在 UIAlertController 中添加 textField?

我想实现一个修改密码的功能。它要求用户在警告对话框中输入他们以前的密码。我想点击“确认修改”按钮然后跳转到另一个ViewController来更改密码。我已经写了一些代码,但我不知道下一刻该怎么写。UIAlertController*alertController=[UIAlertControlleralertControllerWithTitle:@"Changepassword"message:@"Pleaseinputyourpreviouspassword"preferredStyle:UIAlertControllerStyleAlert];[alertControllera

ios - 如何在 UIAlertController 中添加 textField?

我想实现一个修改密码的功能。它要求用户在警告对话框中输入他们以前的密码。我想点击“确认修改”按钮然后跳转到另一个ViewController来更改密码。我已经写了一些代码,但我不知道下一刻该怎么写。UIAlertController*alertController=[UIAlertControlleralertControllerWithTitle:@"Changepassword"message:@"Pleaseinputyourpreviouspassword"preferredStyle:UIAlertControllerStyleAlert];[alertControllera

ios - 如何使用 UIAlertController 替换 UIActionSheet?

我正在维护一个基于SDK6.0的旧iOS项目。这个项目的一个方法叫做-(void)showComboBox:(UIView*)view:withOptions:(NSDictionary*)options用于显示组合框。为了实现这个目标,它使用了UIActionSheet,它在iOS8上已被弃用。我的解决办法是这样的:if(floor(NSFoundationVersionNumber)>NSFoundationVersionNumber10_8){UIAlertController*alertController=[UIAlertControlleralertControllerWi

ios - 如何使用 UIAlertController 替换 UIActionSheet?

我正在维护一个基于SDK6.0的旧iOS项目。这个项目的一个方法叫做-(void)showComboBox:(UIView*)view:withOptions:(NSDictionary*)options用于显示组合框。为了实现这个目标,它使用了UIActionSheet,它在iOS8上已被弃用。我的解决办法是这样的:if(floor(NSFoundationVersionNumber)>NSFoundationVersionNumber10_8){UIAlertController*alertController=[UIAlertControlleralertControllerWi

ios - UIAlertView 首先弃用 IOS 9

我尝试了几种方法来使用UIAlertController,而不是UIAlertView。我尝试了几种方法,但无法使警报操作起作用。这是我的代码,在IOS8和IOS9中运行良好,但出现了不推荐使用的标志。我尝试了下面的优雅建议,但我无法使其在这种情况下发挥作用。我需要提交我的应用程序,这是最后要解决的问题。感谢您提供任何进一步的建议。我是新手。#pragmamark-BUTTONS================================-(IBAction)showModesAction:(id)sender{NSLog(@"iapMade:%d",iapMade3);//IAP

ios - UIAlertView 首先弃用 IOS 9

我尝试了几种方法来使用UIAlertController,而不是UIAlertView。我尝试了几种方法,但无法使警报操作起作用。这是我的代码,在IOS8和IOS9中运行良好,但出现了不推荐使用的标志。我尝试了下面的优雅建议,但我无法使其在这种情况下发挥作用。我需要提交我的应用程序,这是最后要解决的问题。感谢您提供任何进一步的建议。我是新手。#pragmamark-BUTTONS================================-(IBAction)showModesAction:(id)sender{NSLog(@"iapMade:%d",iapMade3);//IAP