uiactionsheet

iOS 5 Load View from UIActionSheet Button

丶灬走出姿态 提交于 2019-12-06 15:58:01
问题 Got an iOS 5 storyboard question. First app I'm building with Storyboards and i like using them, but i can not for the life of me figure out how to load a view from a UIActionSheet button. I have the UIActionSheet running just fine and it loads a UIAddressBook picker, but I want to have it switch to a new storyboard view controller. Any ideas? Here's some of the code: // Specify what to do when a user selects a button from the personSelectQuery - (void)actionSheet:(UIActionSheet *)actionSheet

UIActionSheet Invalid parameter not satisfying: view != nil

跟風遠走 提交于 2019-12-06 15:50:58
问题 I'm getting this error after popping some view controllers on a navigation stack, and at the end I get to ask a question through an action sheet. I'm getting the error parameter not satisfying view != nil , which drives me crazy because it-so facto is not a nil value when I check before calling the action sheet. if (self.view != nil) { NSLog(@"view is not nil"); } UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"title" delegate:nil cancelButtonTitle:@"cancel"

Actually using UIDatePickerModeCountDownTimer as a timer

天大地大妈咪最大 提交于 2019-12-06 14:12:39
I am just trying to make a timer. I would like to use UIDatePickerModeCountDownTimer mode of the UIDatePicker , so that when the user simply selects say 15 mins in the picker, they are passed back to a screen that shows the value of 15 mins in a label that they can then count down from. As I have tried to get the value from the DatePicker, I realized that the picker passes back an NSTimeInterval that gets the current time in seconds: UIDatePicker *pickerView = [[UIDatePicker alloc] init]; NSTimeInterval new = (NSTimeInterval)pickerView.countDownDuration; So all I want is to know the value that

Xcode Saving UIDatepicker to be displayed in a label

寵の児 提交于 2019-12-06 14:11:57
The following code is to show my UIDatepicker: - (IBAction)showActionSheet:(id)sender { NSString *title = UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) ? @"\n\n\n\n\n\n\n\n\n" : @"\n\n\n\n\n\n\n\n\n\n\n\n" ; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:@"%@%@", title, NSLocalizedString(@"Please Select A Date", @"")] delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"I've Made My Choice", nil]; [actionSheet showInView:self.view]; UIDatePicker *datePicker = [[[UIDatePicker alloc] init]

iOS 7: UIAlertView created in UIActionSheet delegate function cannot auto rotate

一笑奈何 提交于 2019-12-06 13:56:40
The issue only can be reproduced in iOS 7. In the delegate function: - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex , if a UIAlertView is created, the alert view cannot auto rotate. Here is the sample code: - (IBAction)buttonTapped:(id)sender { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"action sheet" delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"ok" otherButtonTitles:nil]; [actionSheet showInView:self.view]; } - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

Actionsheet on ipad

↘锁芯ラ 提交于 2019-12-06 08:50:35
问题 This code works fine on iPhone, but on iPad the actionsheet is showing up in the middle of screen. not in the corner where the trigger button is. Also there is no cancel buttons showing up. Also, the app is only in landscape mode. The camera trigger button is on top right corner of the screen. mediaPicker = [[UIImagePickerController alloc] init]; mediaPicker.allowsEditing = YES; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { UIActionSheet

iPad - How can I make my UIActionSheet look like the thin one in safari?

巧了我就是萌 提交于 2019-12-06 08:43:14
The above UIActionSheet is thinner than the normal one. I took the screenshot from Safari when I try to bookmark some website. Mine or the default UIActionSheet in iPad looks like the following. It is thicker than the one in Safari, especially the border. How can I make my own UIActionSheet look like the one in Safari? Do I need to do any particular customisation or I can use some kinds of parameters for UIActionSheet? thanks The instance method: showFromBarButtonItem:animated: Documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIActionSheet_Class/Reference

Customised UIActionSheet

被刻印的时光 ゝ 提交于 2019-12-06 04:53:21
问题 How can I customise UIActionSheet to look like this : Also, if I customise UIActionSheet , will there be a chance of app getting rejected ? 回答1: If you really want to do something like that you could give this a go. I can't guarantee it'll be approved by Apple and honestly, it's just not recommended from a UI and Apple HIG perspective. Keep in mind UIActionSheet has been deprecated and it's recommended to use UIAlertController with a preferredStyle of .ActionSheet so that's what this example

How to dismiss UIActionSheets and UIPopoverControllers without knowing who presented them

蹲街弑〆低调 提交于 2019-12-05 22:39:08
In my client application I have an idle timeout control mechanism and when the user does not do anything with the app for a specified time interval, I display a warning and throw him back to the login screen. This control happens in my container view where I initiate all of my other views. When the idle time is up, I pop this container view to its caller, i.e the login screen. The problem is, if the user does sthg that displays an action sheet or a popover and then does not do anything until the idle time is up, when I throw him to the login screen the action sheets and the popovers also

UIActionSheet checkmark

青春壹個敷衍的年華 提交于 2019-12-05 21:41:27
I need to mark selected button in UIActionSheet. How can I add checkmark in UIActionSheet button? Is there some way specific for UIActionSheet, without standard adding image inside button. otherButtonTitles:@"√ 1", @" 2", Starting from iOS 8.0 you can use UIAlertController . In UIAlertController , each button item is know as UIAlertAction which add accordingly. UIAlertAction contains a runtime property called image which you can set as per your need. UIAlertActioin *action1 = [UIAlertAction actionWithTitle:@"1" style: UIAlertActionStyleDefault handler:(void (^)(UIAlertAction *action)) {