uialertview

UIAlertView And UIAlertController

混江龙づ霸主 提交于 2019-12-13 08:58:41
问题 I am using SWIFT in xcode 6 to develope my application AND needs to support the APP for iphone 4 and later versions... So have selected the ' Deploment Target ' as 7.1 . In simple words needs to support iOS7, iOS8 AND iOS9... When using Alert View I came across in many places discussing now we have to use newly introduced ' UIAlertController ' rather than the old ' UIAlertView '... By reading got to know UIAlertView is deprecated from ios 8. But in my case as I have to support for ios 7.1 AND

Comparing two UIColors is not working in the first time

假装没事ソ 提交于 2019-12-13 07:09:43
问题 When i click on OK button of an UIAlertView, i need to change the background color of the view, its default color is the white, so every time the user click on OK, i need to alternate between two colors, white and red for example: -(void)changeColor{ if([self.view.backgroundColor isEqual: [UIColor whiteColor]]){ self.view.backgroundColor=[UIColor redColor]; }else { self.view.backgroundColor=[UIColor whiteColor]; } } The problem is that on first OK click, the color is supposed to become red,

UIAlertController title is always nil with iOS8

半城伤御伤魂 提交于 2019-12-13 06:58:41
问题 I have a problem since iOS8 and Xcode 6.0.1, the title of my alert dialogs doesn't appear. So I changed my UIAlertView to UIAlertController but I have the same issue... The title of my alert is always to nil and the displaying is very ugly because I don't have the serparator lines. Do you know why i have this ? UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"title" message:@"message" preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction

Displaying an alert message only ONCE but to reappear again on app launch

不羁岁月 提交于 2019-12-13 06:42:11
问题 I'm trying to figure out a way to get a message to appear on one of my view controllers when that screen controller is selected (this view is NOT the first view on the app, so I can't do it at start-up). I only want it to appear ONCE and not appear again when that view is re-selected; however, I want it to appear again if the app is restarted. So far, I am able to get it to appear once without any problem AND it won't pop up again while using the app, which is what I want as I am often going

UIAlertView not showing

一个人想着一个人 提交于 2019-12-13 06:32:55
问题 I have a small problem with one of my UIAlertViews. I'm trying to show it, do some tasks, and then dismiss automatically. This is the code I'm using currently: callingTaxi = [[UIAlertView alloc] initWithTitle:@"" message:@"検索中" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil]; [callingTaxi show]; /* Do some tasks */ [callingTaxi dismissWithClickedButtonIndex:0 animated:YES]; [callingTaxi release]; However, the UIAlertView only shows half-way. I can see the background darken, but

UIActionSheet can't show as expected in iOS9

喜欢而已 提交于 2019-12-13 05:53:24
问题 I found my app can't show UIActionSheet as expected in iOS9。 when I show action sheet, the cornerRadius is big than normal cornerRadius at first, and it will recover to the normal cornerRadius in a very short time。link of images Any help and suggestions will be highly appreciable。 回答1: Disable Renders with edge antialiasing(UIViewEdgeAntialiasing) in your Info.plist 来源: https://stackoverflow.com/questions/32889588/uiactionsheet-cant-show-as-expected-in-ios9

alertViewShouldEnableFirstOtherButton in UIAlertView subclass not called

本秂侑毒 提交于 2019-12-13 04:52:54
问题 I made a UIAlertView subclass. It implements two UIAlertViewDelegate methods: alertView:clickedButtonAtIndex: is called when expected, however alertViewShouldEnableFirstOtherButton: is never called. Had a look at related posts and added: [textField sendActionsForControlEvents:UIControlEventEditingChanged]; but without results. I seem to be out of options. What am I missing here? @implementation MyAlertView + (MyAlertView*)showAlertForJson:(NSDictionary*)json delegate:(id<F2WebAlertDelegate>

UIAlertView IndexButton

一个人想着一个人 提交于 2019-12-13 03:34:01
问题 I have this code right here for annotations in my map... //alert view if ([ann.title isEqual: @"Al-saidiya"]) { NSString *msg=@"Phone No : 079011111"; UIAlertView *alert1 = [[UIAlertView alloc]initWithTitle:@"Contact" message:msg delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"Call Us", nil]; [alert1 show]; } else if ([ann.title isEqual: @"Al-Kadmiya"]) { NSString *msg=@"Phone No : 07902222222"; UIAlertView *alert2 = [[UIAlertView alloc]initWithTitle:@"Contact" message:msg

How to observe when a UIAlertView is displayed?

こ雲淡風輕ζ 提交于 2019-12-13 02:55:57
问题 Is it anyway possible to observe if a UIAlertView is being displayed and call a function when it is. The UIAlertView is not being created and displayed in the same class which I want a function to be called in. Its hard to explain but to put it simply I need to somehow monitor or observe if the view becomes like out of first responder or something because I dont think it is possible to monitor if a UIAlertView is being displayed :/ 回答1: Sounds like a job for notifications. Say that class A

UI consistency error when calling iOS Alert

ⅰ亾dé卋堺 提交于 2019-12-13 02:22:54
问题 I have an iOS Xamarin project were I am getting the following error: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread. This error occurs with the following code: In my Welcome view page I have a button called SyncButton that gets clicked. This click of the button is supposed to sync data with a server using REST. In my WelcomeController I have: .... SyncButton.TouchUpInside += async (object sender, EventArgs e) => { SyncButton.Enabled = false