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
0
votes
1 answer

No initializer for UIAlertAction (title, style, handler)

Dear Stackoverflowers, Can any experts on Swift/UIKit see what I'm doing wrong in the following screenshot? Xcode can't seem to find the convenience initializer for a UIAlertAction based on a title, style and handler, and I don't know of any other…
Jamie
  • 302
  • 1
  • 3
  • 12
0
votes
2 answers

How to pass function in to a closure argument in swift 2.0

I am a beginner to IOS application development as well as swift.I am now trying to us UIAlertController.UIAlertAction asks me for three arguments.The third one is closure.What can i do if I want to pass my predefined function to this parameter?Here…
Min Htet Oo
  • 356
  • 4
  • 15
0
votes
2 answers

Getting error on clicking button in swift

I am a newbie to iOS development and just started learning basic stuffs in swift. Now I am getting error while i try to run my basic coding that I am practising with Auto Layout. The below exceptions occurs while I try to open a dialog on clicking…
Chandru
  • 5,324
  • 9
  • 42
  • 76
0
votes
1 answer

Change title of button

I have an alertController with a button in it. Here's how I created the button: var myButton : UIAlertAction! // Later... self.myButton = UIAlertAction(title: "myButton", style: .Default, handler: {action -> Void in self.myButton.title =…
Jessica
  • 7,791
  • 10
  • 44
  • 89
0
votes
1 answer

Alert button action not working in swift

I have a alerviewcontroller with multiple buttons . These buttons are created based on a array value . My code is given below and the button action dont work properly. var alert : UIAlertController = UIAlertController(title: "Select student",…
azhar
  • 1,591
  • 1
  • 16
  • 36
0
votes
1 answer

Duplicate email Alert Swift + Parse

I'm trying to have it so when a user creates an account... if their email hasn't been used before an Alert box appears saying "Account created" and if the email is already in created (on Parse) then an alert should appear notifying the user. I…
user5034511
0
votes
2 answers

Swift 2.0 doesn't let me make UIAlertAction

this picture should say enough: I have been scouring the web to find answers and none else seems to have this problem. I am using Xcode 7 Beta 3 with Swift 2. I can't figure out what's wrong. Thanks in advance EDIT: Here's the code: func…
Nerdy Lime Apps
  • 301
  • 2
  • 5
  • 18
0
votes
1 answer

@IBAction recursive call

I just would like to get a second opinion on if there's any unforeseen issue with calling IBAction functions recursively. I am asking this question because of a crash that happened once and I found it hard to replicate. Let say we have this…
Mickey Mouse
  • 1,441
  • 3
  • 20
  • 38
0
votes
1 answer

Add custom view in UIAlertController in iOS

I have used below code to show action sheet with Tweet, Facebook and Cancel button. - (void)shareApp:(id)sender { NSString *strCancel = NSLocalizedString(@"Cancel", nil); NSString *strTweet = NSLocalizedString(@"Tweet", nil); NSString…
Jayprakash Dubey
  • 32,447
  • 16
  • 161
  • 169
0
votes
1 answer

Objective-C UIAlertAction

I'm trying to add an action to UIAlertAction which can open Bluetooth-settings directly. Currently I can open the settings, but can anyone help me to change the action from "opening settings" to "opening bluetooth settings"? UIAlertAction*…
NickVH
  • 133
  • 1
  • 9
0
votes
3 answers

UIAlertAction to pop to root view controller in Swift

I am using Swift programming language and using UIAlertController with "Cancel" button to display alert. I'm using below code to create cancel button. let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: {…
Satyam
  • 14,636
  • 29
  • 122
  • 234
0
votes
1 answer

UIAlertAction doesn't perform action after archive and export as adhoc

I am creating an alert in response to discovering a specific BLE characteristic. This alert has 2 UIAlertAction buttons. Each does its action correctly when building from Xcode (v 6.1.1 6A2008a) but when archiving and exporting using an Ad Hoc…
n8yn8
  • 4,117
  • 4
  • 17
  • 20
0
votes
1 answer

Unicode symbols in NSString have wrong dimension

I'm trying to place two Unicode symbols inside an UIAlectAction. I should have two circles, one empty and the other one filled. My current code is: NSString *unicodeStar = [NSString stringWithFormat:@"%C %C", 0x25CB,0x25CF]; UIAlertAction*…
Claus
  • 5,027
  • 8
  • 67
  • 101
0
votes
0 answers

Using UIAlertAction with image instead of text

I want to create a star rating selection component based UIAlertController. My current approach is UIAlertController * view= [UIAlertController alertControllerWithTitle:@"" …
Claus
  • 5,027
  • 8
  • 67
  • 101
-1
votes
1 answer

UI AlertController - Appears smaller in iPad

I've added alert controller for accessing camera & files, shown alert using present viewController. Alert view appears correctly on iPhone. But in iPAD, it appears very small randomly on screen.
Vikraman R
  • 13
  • 5
1 2 3
12
13