uialertview

Where to find a clear explanation about swift alert (UIAlertController)?

南楼画角 提交于 2019-12-31 08:47:26
问题 Couldn't find a clear and informative explanation for this. 回答1: After searching a while on a subject I didn't find a clear explanation , even in it's class reference UIAlertController Reference It is ok, but not clear enough for me. So after collecting some peaces I decided to make my own explanation (Hope it helps) So here it goes: UIAlertView is deprecated as pointed out : UIAlertView in Swift UIAlertController should be used in iOS8+ so to create one first we need to instantiate it, the

UIAlertView starts to show, screen dims, but it doesn't pop up until it's too late!

对着背影说爱祢 提交于 2019-12-31 03:30:10
问题 I have a button which when pressed makes calls that load information from a series of URLs (about 5 seconds loading time). Right before actually making those calls I want to add a "loading" alert. When I use a UIAlertView the screen dims like it's about to pop up, but it doesn't until the data is loaded - too late! I have no idea what's going on, it's like the calls I'm making to load the data are immediately taking preference over showing the new view, even though they're made right after

uialertview called more than once [closed]

北城以北 提交于 2019-12-31 03:18:24
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . It's Irritating ...!!! I googled about this problem, found some Relative Questions but not Satisfactory Answers . So I have One - (IBAction) method that

Show alert view when click on a link

给你一囗甜甜゛ 提交于 2019-12-31 03:06:14
问题 I use formatted text in UIWebView, i have something like this: <a href="tel://0442059840">0442059840</a> I need to show alert to the user when clicking on that link using the UIAlertView for confirmation before launching the telephone call. Is this possible? Thanx in advance. 回答1: Yes but you need to use undocumented method for this. Search on google or stackoverflow you will find it easily. Here is a link for helping you. http://dblog.com.au/iphone-development/iphone-sdk-tip-firing-custom

Taking Text From a UIAlertView

∥☆過路亽.° 提交于 2019-12-31 02:19:26
问题 There seems to be something missing, but the below code is generating nil values for both title and title1 (even though it launches the right alert type correctly and doesn't indicate any warning or error). What could be the problem with this implementation of UIAlertView ? UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"High Score" message:(NSString *)scoreMessage delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; alert.alertViewStyle= UIAlertViewStylePlainTextInput;

UIAlertView fails to show and results in “EXC_BAD_ACCESS” error

血红的双手。 提交于 2019-12-31 02:14:19
问题 A method is called when a return button on the keyboard is pressed. After calling another method which returns an integer a message is created based on that integer. The message is then passed into an UIAlterView and displayed to the user. The alert doesn't have any options (hence why I'm not calling a delegate), but simply notifies the user of what happened. Edit: Below is the full method (previously displayed partial). When I comment out everything before the UIAlertView and substitute the

Prevent AlertView from auto rotating

南楼画角 提交于 2019-12-31 02:14:09
问题 The launch page of my app is set to portrait only with this little bit of code: - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait ; } When the app launches a UIAlertView appears for username and password entry. The method to display it is called from viewWillAppear . This worked fine for iOS6 but since iOS7 , if I switch the device to landscape, the main view remains in portrait but the the alert view and keyboard rotate to landscape. A further bizarre

multiple UIAlertView issue

▼魔方 西西 提交于 2019-12-31 00:41:25
问题 I have an issue with my code, I have two blocks of code of UIAlertViews one with cancel and ok button, and the other to make a UIImagePicker -(IBAction)publicaPeticion { if([txtPeticion hasText] ) { UIAlertView *alerta = [[UIAlertView alloc] initWithTitle:@"Confirmación de Compra" message:@"Deseas comprar la petición por $12.00" delegate:self cancelButtonTitle:@"Cancelar" otherButtonTitles:@"Aceptar", nil]; [alerta show]; } } The issue is between publicaPeticion and cargaImagen -(IBAction

multiple UIAlertView issue

删除回忆录丶 提交于 2019-12-31 00:41:10
问题 I have an issue with my code, I have two blocks of code of UIAlertViews one with cancel and ok button, and the other to make a UIImagePicker -(IBAction)publicaPeticion { if([txtPeticion hasText] ) { UIAlertView *alerta = [[UIAlertView alloc] initWithTitle:@"Confirmación de Compra" message:@"Deseas comprar la petición por $12.00" delegate:self cancelButtonTitle:@"Cancelar" otherButtonTitles:@"Aceptar", nil]; [alerta show]; } } The issue is between publicaPeticion and cargaImagen -(IBAction

Change button title color in UIAlertView

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-30 08:15:31
问题 How can I change the color of the UIAlertView button title. I want title Ok in red color. 回答1: Actually, you can change the tint color of the view of the UIAlertController in iOS8. UIAlertController *alertController = .... [alertController.view setTintColor:[UIColor greenColor]]; 回答2: for Swift 3, use: alertController.view.tintColor = UIColor.red AFTER you present your alert controller 回答3: The Travis Weerts answer should work if you are using a UIAlertController . For those using UIAlertView