Questions tagged [uialertviewcontroller]

33 questions
0
votes
1 answer

UILabel and Text invisible after archive and upload to testflight

I have been stuck on a problem since last week. The thing is when I build on my phone/simulator, my app works well shows like the first picture with label and texts showing perfectly. But, when I archive and upload to testFlight or exports, it shows…
Pcechz
  • 17
  • 3
0
votes
1 answer

Displaying a pop when button is tapped Swift

I have a XIB file with a custom cell, which has two buttons. Basically, I want a dialogue box of some sort to pop up when the user taps the buttons which will inform them of details. I tried to display an alert view from the corresponding Swift file…
0
votes
1 answer

ViewController reloads on presenting alert controller swift

I am working on project. i have added a simple alertController on clicking signup button. when i click on the button my viewcontroller reloads and then it shows that alertController. It is happening on iOS 13 and swift 5 or above let alert =…
Hasnain ahmad
  • 301
  • 1
  • 10
  • 33
0
votes
2 answers

How to prevent special characters in UITextField of UIAlertViewController?

I have UIAlertViewController as shown below image. here's my code : let alertController = UIAlertController(title: alertTitle.security, message: "", preferredStyle: UIAlertController.Style.alert) alertController.addTextField { (textField :…
Uday Babariya
  • 1,031
  • 1
  • 13
  • 31
0
votes
0 answers

How was UIAlertViewController's initializer implemented?

This is a design question. I am creating a custom view controller programmatically, but when I try to customize the initializer for it, I must call designated initializer on its superclass. Either: init(nibName: String?, bundle: Bundle?) or…
ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
0
votes
1 answer

How to add a function as a parameter in a custom function - swift?

I am trying to refactor my UIAlertViewController and pass a function to be executed when a user chooses to tap on one of two options which triggers an action. My question is how do I go about adding a function as a parameter to a custom function? …
dean
  • 321
  • 3
  • 17
0
votes
1 answer

Constraints to UITextView inside UIAlertViewConroller

I have a UITextView inside UIAlertViewController. I need to set leading and trailing constraints to UITextView programatically. Screenshot Here is my code func popUpController() { let alert = UIAlertController(title: "Additional Notes",…
MinnuKaAnae
  • 1,646
  • 3
  • 23
  • 35
0
votes
0 answers

App crashes when mail account is not setup

App is randomly crashing when mail account is not setup. Sometimes, I am getting error alert. Please help me. if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; …
0
votes
1 answer

Can't present alertViewController on rootViewController in AppDelegate

I want to show alertViewController on my rootViewController in AppDelegate when app is launched. Here snippet of code: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey:…
sulabh qg
  • 1,155
  • 2
  • 12
  • 20
0
votes
0 answers

self presentViewController method not found

Trying to replace alertview with alertviewcontroller, using exact example from developer documentation, but keep getting the error that presentViewController method is not found. Here is my code. I've tried to replace "self" with a dozen variations,…
0
votes
1 answer

Erratic dismissal of software keyboard

Expected behaviour: user clicks inside TextField1, the keyboard pops up, user enters a value, NextButton is pressed, keyboard should be dismissed. Anomaly: the keyboard gets dismissed upon pressing NextButton, however it then pops up again after the…
jeddi
  • 651
  • 1
  • 12
  • 21
0
votes
0 answers

Objective-C, How can we rotate UIAlertViewController to 180 degree

I am working on application, I need to rotate screen by 180 degree. For this I am using this code in viewDidLoad Method- if(SYSTEM_VERSION_LESS_THAN(@"8.0")) { // iOS7 …
0
votes
1 answer

rightBarButtonItem position change when UIAlertviewController present

I am setting the image inside the right bar button item. I have used the default navigationbar. Anyone is having any idea why it's happening when UIAlertviewController present?
-1
votes
2 answers

Create a custom UIAlertController

Goal: To create an alert with a UITextField data entry plus two buttons: 'Accept' & 'Cancel'. I understand that the UIAlertViewController is not to be altered. I tried to make a UIViewController but am having trouble with the VC's view filling the…
Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
-1
votes
2 answers

How to set custom ViewController as the content of UIAlertController in swift

I have custom ViewController and want to show it as alert. When i do it like below, my custom ViewController does not fill the entire content of the UIAlertController and scroll bar is shown. How to do that and also how to disable scrolling. let…
nihasmata
  • 652
  • 1
  • 8
  • 28