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

205 questions
2
votes
1 answer

How to change the text of UIButton from ActionSheet

I want to change the text of UIButton city . But its not working, can you tell me whats the problem here? And this IBAction setUpCityDropDown is connected to same UIButton. @IBAction func setUpCityDropDown() { let ActionSheet =…
Ketul Patani
  • 101
  • 1
  • 9
2
votes
2 answers

Return a Bool value from Function after showing AlertView

I have an option to print a document basically in my app. Now a few documents aren't allowed to be printed (unless a criteria is specified). So I'm using delegates. Note that I'm using a mix of both Objective C and Swift. Basically my print code is…
Gaurav Wadhwani
  • 1,352
  • 2
  • 15
  • 32
2
votes
3 answers

How to change UIAlertController button color universally in ObjC

this question is similar to this But, instead of changing the color in every UIAlertController, I want to change it universal like 'AppDelegate'. So, If I change the color in one place, then all the alert controller action button should change to…
user5907771
2
votes
3 answers

Adding a action to a UIAlert that takes the user to settings

I have a UIAlert that notifies the user that they do not have an internet connection and that they need one in order to use the app. As well as letting them dismiss the alert by tapping the ok action I also want to have a action that when tapped…
Tom Fox
  • 897
  • 3
  • 14
  • 34
2
votes
3 answers

How to present UIAlertController from SKScene

I'm working in Spritekit and I'm trying to present a UIAlertController from my SKScene, but I am having trouble doing it. I've watched several tutorials but none of the UIAlertController tutorials have been specific to Spritekit. I keep seeing this…
2
votes
0 answers

Adding arguments to UIAlertAction

I have 2 classes in separate files: lets call them NotificationManagement and NotificationReceiver in my NotificationReceiver class i have the following code: class NotificationReceiver: UIViewController{ //... func…
Ammo
  • 570
  • 1
  • 8
  • 22
2
votes
1 answer

Use of unresolved identifier using an alert.addAction

I'm getting an error on my alert.addAction(). Seems like my project doesn't know where to find it, am I right? I made an alert without buttons, now I'm trying to add buttons to it. So this is my alert window and the code to add the buttons: func…
1
vote
1 answer

How to show "HSAttachmentPicker" in iPad in swift

I need to upload images and pdf files so i am using HSAttachmentPicker framework with this i am able to open picker options and able to upload image and pdf in iPhone but its crashing in iPad when i click upload button error: You must provide…
Swift
  • 1,074
  • 12
  • 46
1
vote
1 answer

Swift UIKit - Showing an alert after another one

I am trying to show an alert after another one in swift. I found a solution but I think this is not the true way. My code piece is below. With this code, alerts can be shown in the view. override func collectionView(_ collectionView:…
Mehmet S.
  • 27
  • 4
1
vote
1 answer

an alert function that i created is calling several times for no reason

I am working on a project using firebase database and I save the users with their displayName instead of uid. I check if the displayName of the user who is trying to signup is on the list of displayNames on firebase and if not I allow user to signup…
1
vote
1 answer

UIAlertAction handler block and main thread

The scenario: the user is presented with a UIAlertController that has a button, with a handler block that updates the UI to indicate the button press. The code in the handler block is wrapped in a dispatch_async to ensure that the code runs on the…
software evolved
  • 4,314
  • 35
  • 45
1
vote
0 answers

UIAlertAction not reusable

When trying to reuse UIAlertAction, it looks like the handler is being executed only once. I've created a test project with an array of UIAlertAction with 3 actions: private var actions = [UIAlertAction]() override func viewDidLoad() { …
bauerMusic
  • 5,470
  • 5
  • 38
  • 53
1
vote
1 answer

RxSwift and AlertAction

I have the Tableview with UIAlertAction. When I press a cell, a pop-up appears and then I can decide which operation to perform. During the Ok operation (button click) I want to observe the data of the cell and receive it in the ViewModel. But there…
beginner992
  • 659
  • 1
  • 9
  • 28
1
vote
1 answer

How to Dismiss Presenting View Controller when "Ok" Action Tapped in UIAlertController

I'm trying to dismiss the current view controller in the completion handler of a UIAlertAction, but it is not dismissing. I have written the following code (The loading indicator is simply a loading alert controller that I dismiss when the data was…
1
vote
1 answer

Progress hud is not showing when press ok from second alert view

initially i am showing one alert when click on yes it will show second alert, in second alert when user press on reset i want show progress view and call service in this progress view is not showing only service call is happening i want to show…
KEERTHI j
  • 220
  • 3
  • 15