uialertview

Cropped characters - iOS11 - Alert Dialog

拟墨画扇 提交于 2019-12-01 14:24:29
Cropped characters - iOS11 - Alert Dialog. How to fix it? [ func settingsButtonPressed() { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) let closeAction = UIAlertAction(title: "Anuluj", style: .cancel) { (action) in //do nothing } alert.addAction(closeAction) let restorePurchases = UIAlertAction(title: "Przywróć zakupy", style: .default) { (action) in self.restorePurchases() } alert.addAction(restorePurchases) let refreshCatalogs = UIAlertAction(title: "Odśwież", style: .default) { (action) in self.collectionView.reloadData() } alert.addAction

Customizing the buttons on a UIAlertView

妖精的绣舞 提交于 2019-12-01 13:44:54
This is the current way i'm customizing my buttons: UIAlertView *av = [[UIAlertView alloc] init]; [av addButtonWithTitle:@""]; UIButton *yesButton = [av.subviews lastObject]; [av show]; [yesButton setImage:[UIImage imageNamed:@"test.png"] forState:UIControlStateNormal]; The problem with this is that the original view is still visible around the image I set for the button. It doesn't completely encapsulate the image. Here's an example of what I have so far: https://www.dropbox.com/s/htb9pfihwmel5oo/testimage.png Is there anyway to make it so that the image completely takes up the entire button?

Show Alert in clickedButtonAtIndex?

六月ゝ 毕业季﹏ 提交于 2019-12-01 13:35:47
i need to show a confirm alert after the user press buttonIndex 1 but... if i use popViewcontroller in clickedButtonAtIndex it crash without errors. The problem is that [self.navigationController popViewControllerAnimated:YES]; is called before second Alert click... how to fix? This is my code: - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"OK!" message:@"Completed" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alert show]; [alert release]; [self

Show Alert in clickedButtonAtIndex?

拜拜、爱过 提交于 2019-12-01 11:27:43
问题 i need to show a confirm alert after the user press buttonIndex 1 but... if i use popViewcontroller in clickedButtonAtIndex it crash without errors. The problem is that [self.navigationController popViewControllerAnimated:YES]; is called before second Alert click... how to fix? This is my code: - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"OK!" message:@"Completed"

iOS6 UIAlertView.title broken?

為{幸葍}努か 提交于 2019-12-01 11:00:07
问题 Today's full of surprises for me... The simple code below isn't working. It never enters the block in the if statement even though the NSLog shows the title property as matching that if condition. I'm going crazy today.... -(void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { NSLog(@"%@", alertView.title); if (alertView.title == @"Warehouse") { //.... never get in here even though NSLog above returns "Warehouse" EDIT: I figured it out. Answering this

Subclassing UIAlertView

丶灬走出姿态 提交于 2019-12-01 10:47:46
问题 Am attempting to subclass UIAlertView to better handle error states in my app. The trouble am having is with the otherButtonTitles nil terminated parameter, when I create my subclass it is only picking up the first string in the list rather than all the strings + (ErrorAlertView *)displayErrorAlertViewWithTitle:(NSString *)title message:(NSString *)message delegate:(id<UIAlertViewDelegate>)delegate errorDelegate:(id<ErrorAlertViewDelegate>)errorDelegate cancelButtonTitle:(NSString *

Displaying a UIAlertController in GameScene (SpriteKit/Swift)

北城余情 提交于 2019-12-01 09:38:34
问题 The simple way to display a UIAlertView, in swift is: let alert = UIAlertView() alert.title = "Alert!" alert.message = "A wise message" alert.addButtonWithTitle("Ok, thank you") alert.show() But this is now depreciated in iOS 9 and recommends using UIAlertController : let myAlert: UIAlertController = UIAlertController(title: "Alert!", message: "Oh! Fancy", preferredStyle: .Alert) myAlert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) self.presentViewController(myAlert,

UIAlertView takes a long time to appear when called in a completion block

被刻印的时光 ゝ 提交于 2019-12-01 09:08:28
Part of my app requires calendar access, which requires a call to the EKEventStore method -(void)requestAccessToEntityType:(EKEntityType)entityType completion:(EKEventStoreRequestAccessCompletionHandler)completion as of iOS 7. I added the request, and everything runs smoothly if the user selects to allow access, but a problem arises if the user denies or has previously denied access. I added a UIAlertView to notify the user if access is denied, but the UIAlertView consistently takes 20-30 seconds to appear, and completely disables the UI during that time. Debugging has shown that [alertView

How to present an AlertView from a UICollectionViewCell

扶醉桌前 提交于 2019-12-01 08:06:41
I am using a UICollectionView with a Map in the header. I want to handle Core Location errors. I have 3 error types and for two of them I want to present a UIAlertView . But I am getting an error, because UICollectionViewCell doesn't have a member called presentViewController . func locationUnknown() { var alert = UIAlertController(title: "Location Unknown", message: "Please try again later.", preferredStyle: UIAlertControllerStyle.Alert) let alertAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: { (action: UIAlertAction!) -> Void in }) alert.addAction(alertAction

How to present an AlertView from a UICollectionViewCell

≡放荡痞女 提交于 2019-12-01 07:04:36
问题 I am using a UICollectionView with a Map in the header. I want to handle Core Location errors. I have 3 error types and for two of them I want to present a UIAlertView . But I am getting an error, because UICollectionViewCell doesn't have a member called presentViewController . func locationUnknown() { var alert = UIAlertController(title: "Location Unknown", message: "Please try again later.", preferredStyle: UIAlertControllerStyle.Alert) let alertAction = UIAlertAction(title: "OK", style: