草庐IT

UIAlertcontroller

全部标签

swift - 如何更改 UIAlertController 高度?

我创建了一个UIAlertControllerletalertC=UIAlertController(title:"Title",message:"Message",preferredStyle:UIAlertControllerStyle.Alert)alertC.addTextFieldWithConfigurationHandler(addTextField)alertC.addAction(UIAlertAction(title:"Cancel",style:UIAlertActionStyle.Default,handler:nil))alertC.addAction(UIA

swift - 如何更改 UIAlertController 高度?

我创建了一个UIAlertControllerletalertC=UIAlertController(title:"Title",message:"Message",preferredStyle:UIAlertControllerStyle.Alert)alertC.addTextFieldWithConfigurationHandler(addTextField)alertC.addAction(UIAlertAction(title:"Cancel",style:UIAlertActionStyle.Default,handler:nil))alertC.addAction(UIA

带有 pickerView 按钮 Action 的快速 UIAlertController 熬夜

我是swift的新手,我正在尝试使用PickerView制作UIAlertContoller但我的按钮有问题,这里有照片我正在尝试更改按钮的约束以保持向上。我在这里阅读了很多答案,但我没有找到任何解决方案这是我的代码:funcdistance(){leteditRadiusAlert=UIAlertController(title:"Choosedistance",message:"",preferredStyle:UIAlertControllerStyle.alert)letpickeViewFrame:CGRect=CGRect(x:0,y:0,width:250,height:

带有 pickerView 按钮 Action 的快速 UIAlertController 熬夜

我是swift的新手,我正在尝试使用PickerView制作UIAlertContoller但我的按钮有问题,这里有照片我正在尝试更改按钮的约束以保持向上。我在这里阅读了很多答案,但我没有找到任何解决方案这是我的代码:funcdistance(){leteditRadiusAlert=UIAlertController(title:"Choosedistance",message:"",preferredStyle:UIAlertControllerStyle.alert)letpickeViewFrame:CGRect=CGRect(x:0,y:0,width:250,height:

ios - ActionSheet 源 View BarButtonItem

我在导航栏中有一个栏按钮项,当按下它时,将显示一个UIAlertController,其样式为.ActionSheet。在iPhone中,它以我想要的方式出现。对于iPad我知道我需要添加//ForiPad,setthepopoverboundsvarpopOver=optionMenu.popoverPresentationControllerpopOver?.sourceView=buttonasUIViewpopOver?.sourceRect=(buttonasUIView).boundspopOver?.permittedArrowDirections=UIPopoverAr

ios - ActionSheet 源 View BarButtonItem

我在导航栏中有一个栏按钮项,当按下它时,将显示一个UIAlertController,其样式为.ActionSheet。在iPhone中,它以我想要的方式出现。对于iPad我知道我需要添加//ForiPad,setthepopoverboundsvarpopOver=optionMenu.popoverPresentationControllerpopOver?.sourceView=buttonasUIViewpopOver?.sourceRect=(buttonasUIView).boundspopOver?.permittedArrowDirections=UIPopoverAr

ios - 使用 UIAlertControllerStyle.ActionSheet 在 UIAlertController 中取消按钮

我想在我的UIAlert中添加一个单独的取消按钮。我知道如何用UIActionSheet做到这一点,但它也应该可以用UIAlert实现,对吧?varsheet:UIActionSheet=UIActionSheet();lettitle:String="...";sheet.title=title;sheet.delegate=self;sheet.addButtonWithTitle("Cancel");sheet.addButtonWithTitle("...")sheet.cancelButtonIndex=0;sheet.showInView(self.view);这将有一个.

ios - 使用 UIAlertControllerStyle.ActionSheet 在 UIAlertController 中取消按钮

我想在我的UIAlert中添加一个单独的取消按钮。我知道如何用UIActionSheet做到这一点,但它也应该可以用UIAlert实现,对吧?varsheet:UIActionSheet=UIActionSheet();lettitle:String="...";sheet.title=title;sheet.delegate=self;sheet.addButtonWithTitle("Cancel");sheet.addButtonWithTitle("...")sheet.cancelButtonIndex=0;sheet.showInView(self.view);这将有一个.

ios - 如何向 UIAlertController 添加操作并获取操作结果 (Swift)

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭6年前。Improvethisquestion我想设置一个带有四个操作按钮的UIAlertController,按钮的标题设置为“红心”、“黑桃”、“方block”和“梅花”。当按下一个按钮时,我想返回它的标题。简而言之,这是我的计划://TODO:Createanewalertcontrollerforiin["hearts","spades","diamonds","clubs"]{//TODO:Addactionbuttontoaler

ios - 如何向 UIAlertController 添加操作并获取操作结果 (Swift)

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭6年前。Improvethisquestion我想设置一个带有四个操作按钮的UIAlertController,按钮的标题设置为“红心”、“黑桃”、“方block”和“梅花”。当按下一个按钮时,我想返回它的标题。简而言之,这是我的计划://TODO:Createanewalertcontrollerforiin["hearts","spades","diamonds","clubs"]{//TODO:Addactionbuttontoaler