uiactionsheet

UIActionSheet button text not displaying properly in ios 8

不问归期 提交于 2019-12-11 22:18:59
问题 I am trying to create little custome UI of UIActionSheet.I want to display the large text in button of UIActionSheet. This code is working fine below ios 8, But in ios 8 - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton *)subview; UIFont *textFont=[UIFont fontWithName:@"Palatino-Roman" size:12.0]; button.titleLabel.font=textFont; button.titleLabel

Get UIActionSheet to dismiss by pressing anywhere on screen

試著忘記壹切 提交于 2019-12-11 18:45:20
问题 How do i get a UIActionSheet to disapear by pressing anywhere on the screen other than the UIAction sheet. Heres the code i tried implementing thats not working currently - (void) viewDidAppear:(BOOL)animated { [paintingVIew becomeFirstResponder]; [super viewWillAppear:animated]; // or viewDidAppear? UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapBehind:)]; [recognizer setNumberOfTapsRequired:1]; recognizer

Any way to prevent UIActionSheet from being dismissed when user clicks a button in it?

*爱你&永不变心* 提交于 2019-12-11 16:16:33
问题 I added a UIProgressView to my UIActionSheet to indicate the download progress. So I do not want my UIActionSheet to be dismissed when user click the download button in it. But is there a way to do that ? Right now I implement didDismissWithButtonIndex delegate method to show UIActionSheet again after it was dismissed. But I was hoping there is a better way. 回答1: UIActionSheet is a modal view, which means that it blocks UI completely. Since blocking UI is considered a bad practice, preventing

UITextField keyboard can't type anything

风流意气都作罢 提交于 2019-12-11 15:47:26
问题 load a xib file as a UIView, and I got a UITextField form a Xib file(it just a view that contains textfield and button). But when the app launched and that textfield comes up. i cannot type any alphabet on this UITextField. But paste a text to that UITextField was OK. Why? Here is my adding code -(IBAction)showSheet{ UIView *myView = [[[NSBundle mainBundle] loadNibNamed:@"LoginViewComp" owner:self options:NULL] lastObject]; [myView setFrame:CGRectMake(0, 44, 320, 400)]; UIButton *btn1 =

ZUUIRevealController - Memory allocations keeps on increasing & slow UIAlertView & UIActionsheet

空扰寡人 提交于 2019-12-11 14:08:26
问题 I am starting with new iOS app in which I have to use Reveal control. So I planned to use great ZUUIRevealController library. I just created UI for 2 - 3 screens . In one of those screen I have to shown UIAlertView & UIActionsheet. But I realised that UIAlertView & UIActionsheet shows very slowly (it adds black overlay first & then shows UIAlertView/UIActionsheet, kind of alert view hangs while showing. Animation is not smooth). I didn't added any logic for coding just created the UI. I didn

How to call presentViewController?

坚强是说给别人听的谎言 提交于 2019-12-11 06:23:41
问题 Here is the situation: I have a class MainView (which is a UIViewController) and call from it an UIActionSheetDelegate class. I want to use the method presentViewController, but the following code does not work (currently being called in the ActionSheet class): [self presentViewController:myViewController animated:YES]; I am a little confused regarding where I should call the method from (MainView or the ActionSheetDelegate). Thanks in advance. 回答1: You call the method on the UIViewController

How can I keep UIActionSheet from being dismissed when background touched?

孤人 提交于 2019-12-11 06:00:03
问题 The default behavior for the UIActionSheet used to be that touching the background did not dismiss it, and in fact did nothing. But with iOS 7 touching the background is equivalent to pressing the cancelButton . I'm modifying some software that needs to be kept to the iOS 6 behavior. How can I keep touches of the background from dismissing the action sheet? 回答1: You can achieve this by not using a cancel button. Check this SO post: UIActionSheet in iOS7 dismissing when user taps ANYWHERE on

how to dismiss action sheet with a custom button

只愿长相守 提交于 2019-12-11 05:02:25
问题 I created two buttons and one date picker on the action sheet.On clicking the done button i want to dismiss the action sheet.Can anyone please help with the code for dismissing the action sheet. i'm using this code for giving action for done button: [doneButton addTarget:self action:@selector(dismissActionSheet:) forControlEvents:UIControlEventValueChanged]; 回答1: in dismissActionSheet method write [aSheet dismissWithClickedButtonIndex:0 animated:YES]; 回答2: Implement the delegate

Clicking a button in UIActionSheet causes my app to crash

寵の児 提交于 2019-12-11 04:48:12
问题 I'm trying to implement a UIActionSheet which will have some sharing buttons on it for sharing to twitter, facebook, email and print. Here is my share view controller.h @interface ShareViewController : UITableViewController <UIActionSheetDelegate, MFMailComposeViewControllerDelegate> @property (nonatomic, strong) NSMutableDictionary *services; @property (strong, nonatomic) UIActionSheet *actionSheet; @property (strong, nonatomic) id <ShareViewControllerDelegate> delegate; @property (nonatomic

iPhone UIActionSheet with UISwitch and UITextField

柔情痞子 提交于 2019-12-11 01:28:30
问题 I'm just looking for advice with this as I have no idea where to start but I think a UIActionSheet is probably best. What I'd like to have is a pop up window (in my head I picture it as being translucent and dark gray). It will not take up the whole screen and the view underneath will still be visible. In the pop up section there will be a textfield (with several lines) and underneath this there will be a number of UISwitches. The pop up will be scrollable and will end with OK/Cancel buttons