uialertview

Using UIActionSheet on iPad

孤人 提交于 2019-12-21 06:58:48
问题 Apple's documentation for the UIActionSheet is causing me confusion. First off, in the iPad Human Interface Guidelines, it says : To learn more about using an action sheet in your code, see “Using Popovers to Display Content” in iPad Programming Guide. But then in the "Using Popovers to Display Content" section, it doesn't mention Action Sheets at all! Am I missing something here? http://developer.apple.com/library/ios/#documentation/General/Conceptual/iPadHIG/UIElements/UIElements.html#/

UIAlertView: Where the cancel button should be?

流过昼夜 提交于 2019-12-20 10:24:44
问题 The alertviews in the iOS: Install App OTA: the cancel button is on the LEFT. Delete an App: the cancel button is on the RIGHT. Where the cancel button should be? 回答1: From Human Interface Guideline: In a two-button alert that proposes a potentially risky action, the button that cancels the action should be on the right (and light-colored). In a two-button alert that proposes a benign action that people are likely to want, the button that cancels the action should be on the left (and dark

UIAlertController showing with delay

依然范特西╮ 提交于 2019-12-20 09:26:40
问题 I'm experiencing a problem with UIAlertController on my app now migrated to iOS8 with Date Picker inside. Below is the code. UIAlertController *AlertView = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *ok = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [AlertView dismissViewControllerAnimated:YES completion:nil]; }]; UIAlertAction *set = [UIAlertAction

MPVolumeView in a UIAlertView?

我的未来我决定 提交于 2019-12-20 07:38:28
问题 Is it possibe to put an MPVolumeView in a UIAlertView? I have tried to put it inside of it, but it does not display. It may be the sizeToFit or initWithFrame: part? Is there a way of testing if the MPVolumeView is actually being created? Here's the code I initialize both the UIAlertView and MPVolumeView with: UIAlertView *volumeAlert = [[UIAlertView alloc] initWithTitle:@"Volume" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; MPVolumeView *volumeView = [

Create a shake animation for a UIAlertView

孤者浪人 提交于 2019-12-20 07:04:27
问题 I'm trying to make a UIAlertView shake. I already made the alertView to stay on button click, but the shake animation is not working. Here is what I have: - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { self.direction = 1; self.shakes = 0; [self shake:aUIView]; } } -(void)shake:(UIAlertView *)theOneYouWannaShake { [UIView animateWithDuration:0.03 animations:^ { theOneYouWannaShake.transform = CGAffineTransformMakeTranslation(5

Updating UIAlertView Message dynamically and newline character issue

偶尔善良 提交于 2019-12-20 03:21:47
问题 I need to display multiple lines of text in the message of my UIAlertView. I have tried adding a '\n', but it has no effect. It still displays: "This is an examp....". HOWEVER, if I turn my iPhone to landscape mode it displays the message as I intend it to. And then if I switch BACK to portrait mode it displays correctly there as well. Update: After further consideration, I suspect it has something to do with the fact that I am updating the current message with a new (and much longer) string.

Updating UIAlertView Message dynamically and newline character issue

£可爱£侵袭症+ 提交于 2019-12-20 03:21:32
问题 I need to display multiple lines of text in the message of my UIAlertView. I have tried adding a '\n', but it has no effect. It still displays: "This is an examp....". HOWEVER, if I turn my iPhone to landscape mode it displays the message as I intend it to. And then if I switch BACK to portrait mode it displays correctly there as well. Update: After further consideration, I suspect it has something to do with the fact that I am updating the current message with a new (and much longer) string.

UIAlertView alert repeat three times within long press gesture recognizer

烈酒焚心 提交于 2019-12-19 12:08:30
问题 I created an application. Through developing it, i used long press button to show an alert. This is my code: - (IBAction)longPressDetected1:(UIGestureRecognizer *)sender { // label1.text = @"Select Iran to observe its historical data projections "; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Press the blue button (+) to select your region " delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } Question: When I want to cancel the UIAlertView by

Cropped characters - iOS11 - Alert Dialog

↘锁芯ラ 提交于 2019-12-19 11:58:07
问题 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:

UIAlertView title does not display

回眸只為那壹抹淺笑 提交于 2019-12-19 11:56:12
问题 I have created an alert as follows UIAlertView *alert1 = [[UIAlertView alloc] initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil]; [alert1 show]; But it does not display the title. How can I fix this? 回答1: I try in Xcode 5.1.1 in your code is working fine in my Xcode, see the output and i also try in Xcode 6.0.1 your code is working fine in my Xcode, see the output if u r using in Xcode 6.0.1 in swift UIAlertView is deprecated. Use