uiactionsheet

Xcode : sharing content via Action Sheet

南笙酒味 提交于 2019-11-30 04:20:21
I would like to replicate this behaviour (see image below) and share contents from my app using this kind of action sheet. The question is: Is this really an Action Sheet? I can't find anywhere tutorial for iOS 7 or 8. Not sure how to proceed. Do the sharing options depends on user's configurations? Hints would be appreciated. It is not in UIActionSheet it is in UIActivityController , which is the default function in iOS. objective-C - (void)presentActivityController:(UIActivityViewController *)controller { // for iPad: make the presentation a Popover controller.modalPresentationStyle =

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

萝らか妹 提交于 2019-11-30 03:04:14
问题 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

UIActionSheet Crashes on iPad / not iPhone

亡梦爱人 提交于 2019-11-30 00:10:33
问题 When I look in the console I get this message 2010-09-18 17:04:05.284 Wasted Time[8998:207] *** Assertion failure in -[UIActionSheet showInView:], /SourceCache/UIKit_Sim/UIKit-1145.66/UIAlert.m:7073 2010-09-18 17:04:05.286 Wasted Time[8998:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: view != nil' 2010-09-18 17:04:05.286 Wasted Time[8998:207] Stack: ( 42272848, 43430700, 42010379, 811796, 3796273, 3862560,

Change text color in UIActionSheet buttons

最后都变了- 提交于 2019-11-29 23:49:53
In my project, I am using UIActionSheet for displaying for some sorting type. I want to change the color of the text displayed in the action sheet buttons. How can we change the text color? iOS 8: UIActionSheet is deprecated. UIAlertController respects -[UIView tintColor] , so this works: alertController.view.tintColor = [UIColor redColor]; Better yet, set the whole window's tint color in your application delegate: self.window.tintColor = [UIColor redColor]; iOS 7: In your action sheet delegate, implement -willPresentActionSheet: as follows: - (void)willPresentActionSheet:(UIActionSheet *

How to customize Buttons in UIActionSheet?

假如想象 提交于 2019-11-29 20:29:54
问题 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"

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

半城伤御伤魂 提交于 2019-11-29 19:24:45
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 the UIActionSheet rather than the last; I want it to be the last one. Is there a way to 1) pass an

Add UIView as subView on UIActionSheet

余生颓废 提交于 2019-11-29 17:22:26
I am working on project where I want to show UIActionsheet with three buttons Change,Cancel and Done and at the place of title I want to put UIView which has some labels. I have created dynamic UIView and I added it to actionsheet but its hiding behind buttons I tried it by all possible ways to setFrame,bounds but I am not able to find solution. I want to place this UIView at the top of UIActionsheet followed by buttons. If you have any doubts feel free to post comments. Here is My Code: -(IBAction)tapbutton:(id)sender { Lablesubview *view = [[Lablesubview alloc]init]; UIActionSheet

Disable WKActionSheet on WKWebView

谁都会走 提交于 2019-11-29 14:21:18
问题 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,

Multiple red/destructive buttons UIActionSheet

若如初见. 提交于 2019-11-29 14:09:48
Is there any way to have more than 1 red "destructive button" in an iPhone app's UIActionSheet? I need to have different clear options, in the same action sheet, one where it deletes everything and one where it deletes less, so both need to be red. I just created a simple customizable replacement for UIActionSheet for iPhone to use in a similar case. It does not use the standard appearance, but this can be changed. Probably it is of any use to you. https://github.com/4marcus/WMActionSheet griotspeak The poster of this question seemed to manage what you want...if i understand you correctly. Is

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

老子叫甜甜 提交于 2019-11-29 02:39:54
问题 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 =