uialertcontroller

UIAlertController change other UIView

北慕城南 提交于 2019-12-13 10:22:37
问题 i spend lot of time but i can not figure out how can fix this problem . I made a picker view that is appearing from bottom . it is working fine but problem is when any other event shown alert view . same time picker view come from top . note . before alert view appear . picker view working fine . after alert view appear then piker view come to the top . bottom appear piker view code : extension RegistrationController { func showSettings(selecteIndex : Int) { //show menu if let window =

How to use UIAlertController in For loop

徘徊边缘 提交于 2019-12-13 09:54:43
问题 I've got a scenario where something may need to be renamed and I'd like to use UIAlertController to collect the new name. I'd like this to be robust for several changes at once (although it's unlikely, I'd like to support it). The issue is that I need the loop to continue only when the results of the current UIAlertController are in, as it is, the loop continues immediately and of course can't present more than one at once. I've been stuck on this all day and need help. I need some kind of

UIAlertView And UIAlertController

混江龙づ霸主 提交于 2019-12-13 08:58:41
问题 I am using SWIFT in xcode 6 to develope my application AND needs to support the APP for iphone 4 and later versions... So have selected the ' Deploment Target ' as 7.1 . In simple words needs to support iOS7, iOS8 AND iOS9... When using Alert View I came across in many places discussing now we have to use newly introduced ' UIAlertController ' rather than the old ' UIAlertView '... By reading got to know UIAlertView is deprecated from ios 8. But in my case as I have to support for ios 7.1 AND

Add Progress bar to UIAlertController with showing update

纵然是瞬间 提交于 2019-12-13 08:37:54
问题 I try to add progress bar on my application. I found the question on How to add Progress bar to UIAlertController? but it didn't show how to update the progress bar. I simplify the code as below but it didn't update the progress bar (it shows only once the progress is completed). What did i over look? Thank you for your help. override func viewDidLoad() { super.viewDidLoad() var topViewController = UIApplication.shared.delegate!.window!!.rootViewController! while (topViewController

How to add tap action for button in “Unit Testing” and show Alert

独自空忆成欢 提交于 2019-12-13 08:03:40
问题 I am trying to write a unit test case for my Login Form, in this if Username and Password empty then we click login button it will show alert, i want to write testcases for this scenario, for me button action not working and alert not showing with unit testing , i am searching for solution long time any one could help..Thanks! 回答1: First, let me say that rather than an alert, you might consider keeping the Log In button disabled until the User Name and Password are non-empty. But to answer

UITableView cell invokes UIAlertController popup …“present” error

若如初见. 提交于 2019-12-13 07:56:27
问题 I have a tableview definition in which I am attempting to invoke an UIAlertController popup. I installed a button in the prototype tableView cell, when the button is touched, an IBAction handles the event. The problem is that the compiler won't let me. present(alertController, animated: true, completion: nil) Generates compiler error: "Use of unresolved identifier 'present' Here is the code: class allListsCell: UITableViewCell { @IBOutlet var cellLable: UIView! @IBOutlet var cellSelected:

Countdown in UIAlertController

此生再无相见时 提交于 2019-12-13 07:17:55
问题 I would like to countdown 3 seconds in my alert controller. Not sure how to do this. I can get the alert to disappear in 3 seconds, just the countdown is missing. //simple alert dialog let alertController = UIAlertController(title: "Workflow successful", message: "Modified reminder's priority or list.", preferredStyle: .Alert) var secs = 3 let defaultAction = UIAlertAction(title: "Dismiss in " + secs, style: .Default, handler: nil) alertController.addAction(defaultAction) dispatch_async

UIAlertController title is always nil with iOS8

半城伤御伤魂 提交于 2019-12-13 06:58:41
问题 I have a problem since iOS8 and Xcode 6.0.1, the title of my alert dialogs doesn't appear. So I changed my UIAlertView to UIAlertController but I have the same issue... The title of my alert is always to nil and the displaying is very ugly because I don't have the serparator lines. Do you know why i have this ? UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction

presentViewController not working in viewDidLoad

∥☆過路亽.° 提交于 2019-12-13 06:55:36
问题 In this code the alert action is shown every time the app become active: - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)applicationDidBecomeActive:(NSNotification *)notification { UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Please make your choice" message:@"Would you like a cup of coffee?

Checkbox in UIAlertController with actionsheet in objective c [duplicate]

送分小仙女□ 提交于 2019-12-13 05:43:05
问题 This question already has an answer here : Add Checkbox List to UIAlertController (1 answer) Closed 3 years ago . I want to add the checkbox i.e uibutton and uilabel in one option in UIAlertAction and only button in another UIAlertAction in UIAlertController. Please help and advice how to achieve it. UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"My Alert" message:@"This is an action sheet." preferredStyle:UIAlertControllerStyleActionSheet]; // 1 UIAlertAction