uiactionsheet

Social action sheet (like on iOS 6)

廉价感情. 提交于 2019-12-17 17:37:19
问题 on iOS 6 a change was that when you want to share something it brings up an action sheet similar to this: I have seen a few other apps that use this, is there a native way to do this without making a custom action sheet? Thanks! 回答1: NSString *textToShare = @"your text"; UIImage *imageToShare = [UIImage imageNamed:@"yourImage.png"]; NSArray *itemsToShare = @[textToShare, imageToShare]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare

Showing a UIPickerView with UIActionSheet in iOS8 not working

流过昼夜 提交于 2019-12-17 15:43:01
问题 Showing a UIPickerView with UIActionSheet in iOS8 not working The code works in iOS7 , however it is not working in iOS8 . I'm sure it is because UIActionSheet is deprecated in iOS8 and Apple recommends to use UIAlertController . However, how to do it in iOS8 ? I should use UIAlertController ? iOS7 : iOS8 : EDIT: My GitHub project solving the problem. 回答1: From the reference for UIActionSheet: UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you

How to fire uibarbuttonitem click event programmatically

走远了吗. 提交于 2019-12-17 15:42:31
问题 I have created a UIActionSheet UIActionSheet * action = [[UIActionSheet alloc]initWithTitle:@"" delegate:self cancelButtonTitle: @"cancel" destructiveButtonTitle: @"OK" otherButtonTitles: nil]; [action showInView:self.view]; [action release]; On the event of the cancel button in the UIActionSheet I want to fire the event of a UIBarButtonItem , which is in my view. My question is how can I fire the button event(without touching the button) in the UIActionSheet delegate method 回答1: Not knowing

How to change the background color of the UIAlertController?

元气小坏坏 提交于 2019-12-17 07:21:59
问题 Due to strange behavior of UIActionSheet in iOS 8, I have implemented UIAlertController with UIAction as buttons in it. I would like to change the entire background of the UIAlertController. But I can't find any ways to do it. Tried even with, actionController.view.backgroundColor = [UIColor blackColor]; But didn't help me out. Any inputs on this regard will be appreciable. Thanks in advance. 回答1: You have to step some views deeper: let subview = actionController.view.subviews.first! as

Change Text Color of Items in UIActionSheet - iOS 8

拈花ヽ惹草 提交于 2019-12-17 06:35:13
问题 I had been using following code to change text color of items which I add in UIActionSheet .: - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton *)subview; [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; } } } It works fine in iOS7 , but in iOS8 the above code doesn't change the text color of items. Now my question is how to change

How to create action sheet Delete in IOS [closed]

假装没事ソ 提交于 2019-12-14 03:33:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to create action sheet same bellow picture with Delete button red color and Cancel button. How can i do that? Thanks much 回答1: Simply use that code make make delete button as destructiveButton UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure you want to delete this backup?"

How to do delete confirmation on iPad according to the human interface guidelines

五迷三道 提交于 2019-12-13 14:24:35
问题 Reading through the iOS Human Interface Guidelines, it appears that there is no "right" way to have the user confirm before deleting. The Guidelines list 3 things when dealing with UIAlertView and UIActionSheet: Do not use an alert view to confirm a user-initiated action. Do not include a "cancel" button on an action sheet (on the iPad). An action sheet must have at least 2 buttons. So... I need to have the user confirm that they want to delete something. The only choices to present them with

how to add checkmark on UIActionsheet's buttons where i can create tick label in iphone?

◇◆丶佛笑我妖孽 提交于 2019-12-13 13:16:17
问题 I am trying to figure out how to add a checkmark to the right side of a button in a UIActionSheet. Is there a safe way to add this checkmark in UIActionSheet's Button? is there any simpler way to do add checkmark in UIActionsheet's buttons without using Of Private api ? 回答1: From iOS 8.0 you can use UIAlertController . In UIAlertController , each button item is know as UIAlertAction which add accordingly. UIAlertAction contains a runtime property called image which you can set as per your

Bringing up a UIPickerview rather than keyboard input iOS

你。 提交于 2019-12-13 12:24:33
问题 Basically I would like to have the user click in the text field and it bring up a populated pickerview rather than a keyboard. This would also need a toolbar with a done button as well Im presuming. I currently have the field set as an output and action and not much more. I also have an actionsheet in code being used for when the user submits something as well if that makes any difference to possibly using an actionsheet for this as well. I tried researching this topic but 99% of the topics

UIActionSheet can't show as expected in iOS9

喜欢而已 提交于 2019-12-13 05:53:24
问题 I found my app can't show UIActionSheet as expected in iOS9。 when I show action sheet, the cornerRadius is big than normal cornerRadius at first, and it will recover to the normal cornerRadius in a very short time。link of images Any help and suggestions will be highly appreciable。 回答1: Disable Renders with edge antialiasing(UIViewEdgeAntialiasing) in your Info.plist 来源: https://stackoverflow.com/questions/32889588/uiactionsheet-cant-show-as-expected-in-ios9