Questions tagged [uialertaction]

UIAlertAction object represents an action that can be taken when tapping a button in an alert. You use this class to configure information about a single action, including the title to display in the button, any styling information, and a handler to execute when the user taps the button. After creating an alert action object, add it to a UIAlertController object before displaying the corresponding alert to the user. Available in iOS 8.0 and later in UIKit.

A UIAlertAction object represents an action that can be taken when tapping a button in an alert. You use this class to configure information about a single action, including the title to display in the button, any styling information, and a handler to execute when the user taps the button. After creating an alert action object, add it to a UIAlertController object before displaying the corresponding alert to the user. Available in iOS 8.0 and later in UIKit. UIAlertAction

191 questions
-1
votes
1 answer

Displaying list using UIAlertController take too much time

I am having a list of countries which i want to show using UIAlertController.It does get showed up but it takes too much time as there are about 150+ countries. So how can i fasten up this process using UIAlertController only. Here is my code :…
TheTravloper
  • 216
  • 5
  • 16
-1
votes
1 answer

I am stuck when pressing the key OK in a UIAlertAction

I am quite new to Swift and IOS, but I don't think that I should be stuck in the alert "popup". I can see the following but when pressing Restart, nothing happens.Alert popup If I use a closure instead of nil to handler nothing happened. I wrote the…
imilejo
  • 7
  • 2
-1
votes
4 answers

How to create a reusable UIAlert ActionSheet as an UIViewController extension?

I would like to create an action sheet that can be used several time in my code. To do so, I need to be able to use functions according to the action sheet title. Is there a way to pass functions as a parameter array like the "title"…
-1
votes
1 answer

How to call a function [do something] after a UIAlertAction?

I have created a class which allows me to customize a UIAlertAction whenever I need. The problem is that I need to do something, call a function which is inside another class, after the user presses delete (the option other than cancel) What I…
user11182249
-1
votes
2 answers

How to Change UIAlertController UIAlertAction Colour and add Checkmark Sign?

I want to Change UIAlertController UIAlertAction TextColor and display Checkmark image when user Select an action. i am able to show normal UIAlertController. but how can i achieve this? Can any one please suggest me or help me to do that? Thanks
user7832515
-1
votes
1 answer

Swift: How to make an action occur if UIAlertAction is pressed?

I'm trying to make an app where if the score is 3 the app displays a message that says "you lose" but keeps '3' as the number in the score label until the End Game option in the popup is pressed, at which point the score goes back to 0 for a new…
radaro73
  • 11
  • 1
-1
votes
3 answers

Attempt to present on whose view is not in the window hierarchy

I am working on a project using ResearchKit, so I send the user into the task I create: let taskViewController = ORKTaskViewController(task: SurveyTask, taskRunUUID: nil) taskViewController.delegate = self presentViewController(taskViewController,…
asheyla
  • 2,597
  • 4
  • 14
  • 30
-1
votes
2 answers

Swift: Change UIAlertAction title on click

How do I reference self from within a UIAlertAction? refreshAlert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { (action: UIAlertAction!) in // self.title = String("HELLO") print("Handle Ok logic here") })) I…
Marcus
  • 7,523
  • 9
  • 39
  • 79
-2
votes
1 answer

AlertAction delayed in Completions Swift 5

I have an alert controller with option buttons to set a value in a text field then call a method in the completion. The alert view pops up as normal but when a button is pressed setting the text field value is delayed and the method actual runs…
-3
votes
0 answers

Customizing a specific action in SDCAlertView

I want to customise the action to look like this: How do I surround the OK button with the turquoise border using the visualStyle provided? I am unable to find a solution.
-4
votes
2 answers

Swift - Using a Timer to detect user inactivity then display an Alert after 4 minutes to prompt the user if they are still there

I have a basic application for iPads which consists of 4 views. Across the whole app, I want to be able to detect user inactivity and then display an Alert after 4 minutes which will ask the user if they are still there. I have found some useful…
pmh
  • 1
  • 3
1 2 3
12
13