uiactionsheet

keypad not working for textfield in uiactionsheet

戏子无情 提交于 2020-01-15 03:10:33
问题 i have added textfeld in uiactionsheet as -(void)showAction { printf("getting action ready \n"); UIActionSheet *asheet = [[UIActionSheet alloc] initWithTitle:@"New Sheet Name" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: nil]; [asheet showInView:self.view]; [asheet setFrame:CGRectMake(0, 70, 320,200)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100,200, 25)]; textField.borderStyle= UITextBorderStyleRoundedRect;

keypad not working for textfield in uiactionsheet

烈酒焚心 提交于 2020-01-15 03:10:09
问题 i have added textfeld in uiactionsheet as -(void)showAction { printf("getting action ready \n"); UIActionSheet *asheet = [[UIActionSheet alloc] initWithTitle:@"New Sheet Name" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: nil]; [asheet showInView:self.view]; [asheet setFrame:CGRectMake(0, 70, 320,200)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100,200, 25)]; textField.borderStyle= UITextBorderStyleRoundedRect;

Change UIActionSheet buttons background color and button font

左心房为你撑大大i 提交于 2020-01-06 19:30:32
问题 I have a UIActionSheet in my application. I want to change the background color of actionsheet buttons and the font of the buttons. I made a search found below code: for (UIView *_currentView in actionSheet.subviews) { if ([_currentView isKindOfClass:[UIButton class]]) { //DO YOUR WORK } } but this code is not working on ios 8. for ios I found below code too: [[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor redColor]]; but this code only changes the

Change UIActionSheet buttons background color and button font

允我心安 提交于 2020-01-06 19:29:06
问题 I have a UIActionSheet in my application. I want to change the background color of actionsheet buttons and the font of the buttons. I made a search found below code: for (UIView *_currentView in actionSheet.subviews) { if ([_currentView isKindOfClass:[UIButton class]]) { //DO YOUR WORK } } but this code is not working on ios 8. for ios I found below code too: [[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor redColor]]; but this code only changes the

programmatically stop uipickerview animation on iphone

有些话、适合烂在心里 提交于 2020-01-01 09:24:20
问题 I have a UIActionSheet containing a picker and a UIToolbar. On the UIToolBar there is a save button. However, some of my users reported pressing the save button before the UIPickerView stops spinning thus only retrieving the initial value (before spinning). Is there a way to get the currently selected item of the UIPickerView once the user taps save or get feedback of the active selected item while it's spinning? Thanks 回答1: Even if they dismiss the picker while it's still spinning, the

Problems with Cancel Button and UIActionSheet

旧街凉风 提交于 2020-01-01 08:25:28
问题 How do I determine if the cancel button was pressed on a UIActionSheet? My UIActionSheet is set up like this: -(IBAction)fileButtonPressed { UIActionSheet *mymenu = [[UIActionSheet alloc] initWithTitle:@"Select Folder" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil]; for (i=0; i<3; i++) { [mymenu addButtonWithTitle:@"Button Name"]; } [mymenu showInView:self.view]; } The problem that I have is that I cannot differentiate between the cancel button and

Problems with Cancel Button and UIActionSheet

眉间皱痕 提交于 2020-01-01 08:25:26
问题 How do I determine if the cancel button was pressed on a UIActionSheet? My UIActionSheet is set up like this: -(IBAction)fileButtonPressed { UIActionSheet *mymenu = [[UIActionSheet alloc] initWithTitle:@"Select Folder" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil]; for (i=0; i<3; i++) { [mymenu addButtonWithTitle:@"Button Name"]; } [mymenu showInView:self.view]; } The problem that I have is that I cannot differentiate between the cancel button and

UIActionSheet Dismiss when click/ tap outside

人走茶凉 提交于 2020-01-01 06:35:27
问题 I'm novice in iPhone development. Can anyone tell me how to dismiss UIActionSheet control when i tapped outside of it? In my actionSheet i have only datePicker control and it pops up over tab bar control now what i want whenever user click outside of it, it should dismiss instead of using actionSheet's cancel button. Regards 回答1: Hi refer below link: How to make a uiactionsheet dismiss when you tap outside eg above it? http://splinter.com.au/how-to-allow-closing-a-uiactionsheet-by-tappi 回答2:

Create UIActionSheet 'otherButtons' by passing in array, not varlist

别来无恙 提交于 2019-12-29 10:12:05
问题 I have an array of strings that I want to use for button titles on a UIActionSheet. Unfortunately, the otherButtonTitles: argument in the method invocation takes a variable length list of strings, not an array. So how I can I pass these titles into the UIActionSheet? The workaround I've seen suggested is to pass nil into otherButtonTitles:, then specify the button titles individually by using addButtonWithTitle:. But this has the problem of moving the "Cancel" button to the first position on

Subclassing UIAlertController

大城市里の小女人 提交于 2019-12-29 08:32:10
问题 With pre-iOS 8 we had to use the UIAlertView and UIActionSheet Which we weren't allowed to mess with the view hierarchy or subclass on either them. UIAlertView Documentation The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified. UIActionSheet Documentation UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you need to present a sheet with more