uialertview

UIAlertView Causes Crash in iOS SDK 6.0

笑着哭i 提交于 2019-12-04 16:03:10
问题 I recently submitted an app to App Store that has not been accepted yet. Meanwhile, I downloaded Xcode 4.5 and tested my app in iPhone 6.0 Simulator. However, when I intend to show an UIAlertView , the app crashes on [myAlertView show] line with EXC_BAD_ACCESS error. It works fine with iPhone 5.1 Simulator. Here's my code: UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Warning" message:@"Are you sure?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];

Make a UIAlertView show after second launch

杀马特。学长 韩版系。学妹 提交于 2019-12-04 15:02:40
If that isn't possible, then how may I do it after, say, 3 minutes of app usage? This is going to be used for a Rate Us alert but I would rather the user have some time to actually use the app before it asks for them to rate. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options { // ... if ([self plusPlusLaunchCount] == 2) { [self showRateUsAlert]; } return YES; } - (void)showRateUsAlert { // show the Rate Us alert view } - (NSInteger)plusPlusLaunchCount { static NSString *Key = @"launchCount"; NSInteger count = 1 + [[NSUserDefaults

Keyboard loses hiding ability “if I use a UIAlertView”

為{幸葍}努か 提交于 2019-12-04 13:35:08
问题 I'm coding some iPad application, and a strange effect has started to appear. I use a navigation bar so I can navigate freely through my views. Anyway, in one of these innerviews, I offer the possibility of checking if the user really wants to go back to the main view via an alert view (Just a Yes/no pair of buttons). Once the user confirms he wants to go back, then I "manually" pop the view, and I navigate to the main view, where the keyboard hides. BUT, the thing is virtual keyboard acts

show UIAlertView when In app purchase is in progress

六月ゝ 毕业季﹏ 提交于 2019-12-04 13:03:54
I've added an UIAlertView that has UIActivityIndicatior as a subview on my application. This alertView only show when the purchase is in progress. I've put my alert view in this way in my StoreObserver: - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchasing: [self stillPurchasing]; // this creates an alertView and shows break; case SKPaymentTransactionStatePurchased: [self completeTransaction:transaction]; break; case

adding a custom view to a alert view

我只是一个虾纸丫 提交于 2019-12-04 13:03:00
问题 i have a problem like this: i want to show a customized view inside a alert view. so i create a separate xib file and designed my interface.and implemented the class for it too.but when i apply below code,it gives me an error. this is the code : UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Confirm your Action" message:@"Click OK to confirm" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel",nil]; NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@

change width of UIAlertView in iPad

为君一笑 提交于 2019-12-04 12:26:09
问题 Is there any way to change the frame of the UIAlertView in iPhone or iPad. I tried changing the frame in the following delegate method - (void)willPresentAlertView:(UIAlertView *)alertView; but even then the width of the Alertview remained unchanged. And I think a small Alertview in iPad will not make sense. And I guess there must be a way to achieve it, at least in iPad. Thanks, krishnan. 回答1: Hmm, this code works fine (except, when you are trying to decrease size - cause in this case you

iphone navigationController : wait for uialertview response before to quit the current view

笑着哭i 提交于 2019-12-04 12:07:41
问题 I have a view with a back button managed with a navigation controller and I want to check if a file has been saved when the user click on the back button. If the file has been saved you go back in the previous view, else a uialertview ask you if you want to save the file or not. So I did that but the view disapear and the alertview appear after. -(void)viewWillDisappear:(BOOL)animated { if(!self.fileSaved){ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Save the file?"

How to use UIKit localized string in my app

会有一股神秘感。 提交于 2019-12-04 10:58:54
问题 We are building a iOS game, our company requires cancel button in a UIAlertView should always be localized depend on user's device language. It looks like there is such a string in UIKit framework, how can I access it in my own app? Or, any other way to create a UIAlertView with a localized cancel button? Thank you Answer by myself: Problem solved by the following code: NSBundle* uikitBundle = [NSBundle bundleForClass:[UIButton class]]; NSString *language = [[[NSUserDefaults

IOS Xcode Verifying Xcode.app [duplicate]

白昼怎懂夜的黑 提交于 2019-12-04 10:47:09
问题 This question already has answers here : Xcode won't start, stuck on 'Verifying “Xcode”…' (16 answers) Closed 3 years ago . All the times when i Open Xcode 7.0. its alert like this and takes time every time. I Just want solution to Completely remove this Alert from Starting of Xcode.. At tome of open Xcode, Gives Alert -> "Verifying XCode.app" 回答1: open terminal and type the following commend, this will help to open the Xcode in quickly cd /Applications xattr -d com.apple.quarantine Xcode.app

Alternative to UIAlertView for iOS 9?

不打扰是莪最后的温柔 提交于 2019-12-04 10:11:58
问题 UAlertView is deprecated in iOS 9 and later. What would be an alternative? UIAlertView *new = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Your InApp Purchases were successfully restored" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [new show]; 回答1: You can use this code to replace an alert view: UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"Message" preferredStyle:UIAlertControllerStyleAlert]; [alertController