uialertview

UIAlertView Change BackGround Color

吃可爱长大的小学妹 提交于 2020-01-13 18:03:05
问题 Hi I am trying to change the UiAlertview BG color to green, using setBGcolor it give me following output, Which had a dark color Specified in SetBGColor, anyother way to remove the background color or something else. 回答1: No, you can't customize a UIAlertView , nor can you can use appearance property in this case. So if you have to do it, what you can do is use a view that gives a UIAlertView -like display. You can create a custom view with buttons and use it throughout the app. Or you can

UIAutomation : Cancel button on Alert view is tapped without actually doing it

两盒软妹~` 提交于 2020-01-13 11:36:09
问题 I'm facing this weird problem in UIAutomation. I am checking an alert. In that, I am trying to log alert title and alert message. My code for this is: UIATarget.onAlert = function onAlert(alert) { UIALogger.logMessage("alert Shown"); UIALogger.logMessage(frontApp.alert().name()); UIALogger.logMessage(frontApp.alert().staticTexts()[1].value()); } var target = UIATarget.localTarget().frontMostApp().mainWindow(); target.scrollViews()[0].buttons()["saveB"].tap(); UIATarget.localTarget().delay(2);

Knowing when user has pressed cancel buttons during In-App purchase

蓝咒 提交于 2020-01-12 09:16:13
问题 I am writing code for in-app purchases and using a "Processing..." view with an activity indicator to block the "Buy Now" button once a purchase is initiated. However, how can you tell when the user hits a "Cancel" button since those alert views are coming from the AppStore.app? Is there a delegate method that gets called when those cancel buttons are pressed? Or is it a matter of your view becoming firstResponder again? What am I missing here? If you don't think this is possible, have a look

Forcing UIAlertView into landscape mode

你。 提交于 2020-01-11 04:13:05
问题 I need to display a UIAlertView in landscape mode. I tried the obvious, setting the transform in the willPresentAlertView: delegate method to no avail: -(void) willPresentAlertView:(UIAlertView *)alertView { alertView.transform = CGAffineTransformMakeRotation(M_PI_2); } Any suggestions on how to fix this? 回答1: Have you tried in the didPresentAlertView ? - (void)didPresentAlertView:(UIAlertView *)alertView { // UIAlertView in landscape mode [UIView beginAnimations:@"" context:nil]; [UIView

Check if UIView is displaying a UIAlertView

自闭症网瘾萝莉.ら 提交于 2020-01-11 03:13:05
问题 Is it possible to determine if the current UIView has a UIAlertView on display (other than setting a variable every time a UIAlertView is created). I'm thinking something along the lines of if ([self.view.subviews containsObject:UIAlertView]) { ... } But that obviously doesn't work. 回答1: This will not work in iOS7 and above. [alertView Show] adds subview on main window I guess. for (UIWindow* window in [UIApplication sharedApplication].windows){ for (UIView *subView in [window subviews]){ if

Align message in UIAlertView to left in iOS 7

此生再无相见时 提交于 2020-01-10 10:38:38
问题 I want to left align message in UIAlertView to left in iOS7 , i am able to do that in iOS 5.x and 6.x using UITextAlignmentLeft and NSTextAlignmentLeft and not on iOS 7 . 回答1: Sten is right we can't customize appearance of UIAlertView in iOS 7, if you need you can made a custom Alert view code is available at https://github.com/wimagguc/ios-custom-alertview 来源: https://stackoverflow.com/questions/19027083/align-message-in-uialertview-to-left-in-ios-7

Align message in UIAlertView to left in iOS 7

馋奶兔 提交于 2020-01-10 10:36:07
问题 I want to left align message in UIAlertView to left in iOS7 , i am able to do that in iOS 5.x and 6.x using UITextAlignmentLeft and NSTextAlignmentLeft and not on iOS 7 . 回答1: Sten is right we can't customize appearance of UIAlertView in iOS 7, if you need you can made a custom Alert view code is available at https://github.com/wimagguc/ios-custom-alertview 来源: https://stackoverflow.com/questions/19027083/align-message-in-uialertview-to-left-in-ios-7

UIAlertView crashing on undocumented method

青春壹個敷衍的年華 提交于 2020-01-09 18:24:49
问题 Our app has been crashing with a frequency of roughly 1 in 1,500 launches due to a bug that is proving elusive. The relevant portion of the stack trace is included. It's being fired as a callback so I have no reference for where it's occurring in my own code. It looks like what's going on is there is a UIViewAnimationState object that is calling UIAlertView's private method ( _popoutAnimationDidStop:finished: ). Only problem is, it appears the UIAlertView has been dealloced by this point. I

UIAlertView crashing on undocumented method

*爱你&永不变心* 提交于 2020-01-09 18:23:42
问题 Our app has been crashing with a frequency of roughly 1 in 1,500 launches due to a bug that is proving elusive. The relevant portion of the stack trace is included. It's being fired as a callback so I have no reference for where it's occurring in my own code. It looks like what's going on is there is a UIViewAnimationState object that is calling UIAlertView's private method ( _popoutAnimationDidStop:finished: ). Only problem is, it appears the UIAlertView has been dealloced by this point. I

Swift3 UITextField in UIAlert validation after button pressed

↘锁芯ラ 提交于 2020-01-07 04:39:05
问题 I have implemented alert window with two text fields. And I want to perform some validation: if one of text fields is blank (user did not input any value), application should not allow user to press the "Done" button. I don't want to show any alerts, just want to not allow user to save blank data. I have created the function listed below. Added two guards with return. But in this case if user did not input anything, alert just closes and nothing is saved. I don't want alert window to be