uiactionsheet

Invalid context error on iOS 7 when adding a UIPickerView inside a UIActionSheet?

泄露秘密 提交于 2019-11-30 19:05:36
I have an UIPickerView inside an UIActionSheet and have done that in a way suggested by many others here at SO: Add UIPickerView & a Button in Action sheet - How? how to add UIPickerView in UIActionSheet The solutions have worked fine until now when testing my app on iOS 7. It still works but I got a lot of "invalid context 0x0" warnings during runtime in Xcode. The errors are coming with a nice message too: CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall

UIActionSheet crash in iOS8beta

好久不见. 提交于 2019-11-30 17:40:39
问题 I have code which simply display UIActionSheet on button click. but it will crash when I build it using XCode5.1 + iOS8beta in iPad. below is a code I used to display UIActionSheet. UIActionSheet *tmpActionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Ok", nil]; [tmpActionSheet showInView:self.view]; Note: - It perfectly work with XCode6beta + iOS8beta (iPhone/iPad both) - It perfectly work with

Is it possible to edit UIAlertAction title font size and style?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 15:42:53
问题 Now that iOS8 deprecated UIActionsheet and UIAlertview the customization working on iOS7 is not taking effect anymore. So far the only customization I'm aware is the tint color. And what I need is changing the title's font size and style which I haven't found any way of doing so with the new UIAlertAction . Already referred to this but I'm still hoping there's a way to change at least the title size and font. Providing you some of my code for UIAlertAction UIAlertController *

How to customize Buttons in UIActionSheet?

主宰稳场 提交于 2019-11-30 15:04:00
I want to change the image of the buttons of UIActionSheet , I have images for each button , and I want each button show the image I want. I searched the web I found a lot of answers but they didn't work. Here is the initialization of the UIActionSheet -(IBAction)showActionSheet:(id)sender { UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:nil otherButtonTitles:@"Other Button 1", @"Other Button 2", nil]; popupQuery.actionSheetStyle = UIActionSheetStyleDefault; [popupQuery showInView:self.view];

Is it possible to edit UIAlertAction title font size and style?

半腔热情 提交于 2019-11-30 14:48:28
Now that iOS8 deprecated UIActionsheet and UIAlertview the customization working on iOS7 is not taking effect anymore. So far the only customization I'm aware is the tint color. And what I need is changing the title's font size and style which I haven't found any way of doing so with the new UIAlertAction . Already referred to this but I'm still hoping there's a way to change at least the title size and font. Providing you some of my code for UIAlertAction UIAlertController * alertActionSheetController = [UIAlertController alertControllerWithTitle:@"Settings" message:@"" preferredStyle

Disable WKActionSheet on WKWebView

邮差的信 提交于 2019-11-30 13:01:30
I'm migrating an iOS app form UIWebView to WKWebView. So far so good... In the previous app I disabled long press and implemented a custom long press (to do custom handling of links), however I can't get this working in the WKWebView I've tried the following: - (void)webView:(WKWebView *)wkWebView didFinishNavigation:(WKNavigation *)navigation { [wkWebView evaluateJavaScript:@"document.body.style.webkitTouchCallout='none';" completionHandler:nil]; } I've checked and that line gets executed, the response of the call is @"None" But it responds with: Warning: Attempt to present on whose view is

keyboard in UIActionSheet does not type anything

守給你的承諾、 提交于 2019-11-30 10:58:16
I'm wondering why my iPhone keyboard opened by a UITextField doesn't type anything except the delete key and the clear button within the text field itself. The text field is embedded in a UIActionSheet with this code sample: // setup UITextField for the UIActionSheet UITextField* textField = [[UITextField alloc] initWithFrame:CGRectMake(8.0, 34.0, 304.0, 30.0)]; NSString* startText = [[self.pathName lastPathComponent] stringByDeletingPathExtension]; textField.borderStyle = UITextBorderStyleRoundedRect; textField.backgroundColor = [UIColor whiteColor]; textField.clearButtonMode =

How to make a uiactionsheet dismiss when you tap outside eg above it?

风流意气都作罢 提交于 2019-11-30 07:10:48
问题 How do i make a uiactionsheet dismiss when you tap outside eg above it? This is for iPhone. Apparently the ipad does this by default (I may be wrong). 回答1: Ok got a solution. The following applies to a subclass of a UIActionSheet // For detecting taps outside of the alert view -(void)tapOut:(UIGestureRecognizer *)gestureRecognizer { CGPoint p = [gestureRecognizer locationInView:self]; if (p.y < 0) { // They tapped outside [self dismissWithClickedButtonIndex:0 animated:YES]; } } -(void)

how to add UIPickerView in UIActionSheet

早过忘川 提交于 2019-11-30 05:38:12
问题 i'm having task to enter rating(1 - 5) value, so i found the below code for date picker, can anyone help me to alter below code so to add UIPickerView to choose rate from 1 to 5 UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"Ratings" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil]; UIDatePicker *pickerView = [[UIDatePicker alloc] init]; pickerView.datePickerMode = UIDatePickerModeDate; [menu addSubview:pickerView]; [menu showInView

Keyboard hide and show again right after UIActionSheet dismiss in iOS 7, SDK 7

与世无争的帅哥 提交于 2019-11-30 05:01:12
I create an UIActionSheet in my ViewController. I also add code to catch UIKeyboardWillShowNotification and UIKeyboardWillHideNotification notification. My problem is when I dismiss, I get two notification keyboard hide and show again . Somebody can show me how to prevent that problem ? It only happen in iOS 7 and build with SDK 7 Update some code: In viewDidLoad, I init a button, when touch button, action sheet will be showed. - (void)viewDidLoad { [super viewDidLoad]; UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(10, 50, 100, 30); [button