uiactionsheet

iPad crash with UIActionSheet displayed from child view controller

不羁的心 提交于 2019-12-23 17:46:17
问题 I apologize if this has been asked but I can't seem to find it anywhere. I even recreated my issue in a demo project in case any of you want to see it first-hand, although I don't know where I should post it. I have a xibless UINavigationController based app. Some of my child ViewControllers have a button on the right side at the top that then displays a UIActionSheet. My app is designed for iPhone and iPad, so when I get ready to display the UIActionSheet I do: UIActionSheet *actionSheet = [

iOS UIActionSheet presented from LongPress gesture on a button erroneously requires double clicking buttons to dismiss

狂风中的少年 提交于 2019-12-23 12:33:55
问题 I have a tabbar application, in one of the tabs I have a MKMapView. In this view, my viewDidLoad I am initializing a long press gesture recognizer for a UIButton. When this button is pressed and help it presents a UIActionSheet with 5 buttons + the cancel button. Each button represents a zoom level: "World", "Country", "State", "City", "Current Location". Selecting a button in the UIActionSheet zooms the underlying MKMapView to that level. The problem I am having is that all of the buttons

iPhone UIActionSheet auto-rotating not working

流过昼夜 提交于 2019-12-23 10:40:49
问题 I read a lot about that. People say it will not autorotate whene its parent is not set to auto rotate. I tried everything but no luck. I created view-based app (v4.2) with a button that executes this: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTitles:@"Other Button 1", nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; [actionSheet

UIActionSheet taking long time to respond

匆匆过客 提交于 2019-12-23 09:22:53
问题 I am creating a UIActionSheet on actionSheet:clickedButtonAtIndex delegate method. - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex if(buttonIndex == 1){ [self.myFirstView removeFromSuperview]; if (!self.mySecondView) { [[NSBundle mainBundle] loadNibNamed:@"MySecondView" owner:self options:nil]; } [self.mySecondView setFrame:CGRectMake(0, 0, 320, 480)]; [[UIApplication sharedApplication].keyWindow addSubview: self.mySecondView]; UIActionSheet *

how to display only time in UIDatePicker iphone

三世轮回 提交于 2019-12-23 06:48:27
问题 In my app i am displaying a UIDateTimePicker in action sheet through code. it is working fine. But i don't want to display date and day.How this can be done. Please help. Thanks in advance. code: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Select Date",@"Selecte Date")delegate:self cancelButtonTitle:NSLocalizedString(@"Done",@"Done") destructiveButtonTitle:NSLocalizedString(@"Cancel",@"Cancel") otherButtonTitles:nil]; actionSheet.actionSheetStyle =

two action sheet showing up when using long press

三世轮回 提交于 2019-12-23 04:28:52
问题 Inside my viewDidLoad, I have the following: UILongPressGestureRecognizer *longpressGesture =[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongpressGesture:)]; longpressGesture.minimumPressDuration = 1; longpressGesture.allowableMovement = 5; longpressGesture.numberOfTouchesRequired = 1; [self.tableView addGestureRecognizer:longpressGesture]; [longpressGesture release]; I created the following: -(IBAction) handleLongpressGesture:(UIGestureRecognizer *)

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

◇◆丶佛笑我妖孽 提交于 2019-12-22 18:58:07
问题 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 回答1: The instance method: showFromBarButtonItem:animated:

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

陌路散爱 提交于 2019-12-22 18:10:56
问题 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

Xcode Saving UIDatepicker to be displayed in a label

余生长醉 提交于 2019-12-22 18:02:48
问题 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

Usernotes in ios

筅森魡賤 提交于 2019-12-22 14:03:28
问题 I want to create a user note form in my application,currently am using one textview inside a view its looking bad !! is there any other control suits for this purpose? Main aim is when user click the button a small textview will appear they can add comments there and save it into plist. I want something like this(check the image) i want that kind of usernotes (its my image) please give me some advices and helps to develop this.. 回答1: Using UIAlertView with UITextView can be useful for you.