uiactionsheet

How to add UIActionSheet button check mark?

落花浮王杯 提交于 2019-12-20 20:37:01
问题 I wonder how to add check mark to the right of actionSheet button the simplest way? Bellow is a screenshot of Podcasts app. 回答1: Note that the solution can crash in a future update to iOS. I'm accessing undocumented private APIs. Such solutions are very fragile. Please see the comments below. Finally I got the answer by using UIAlertController: UIAlertController *customActionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];

Xcode iPad UIActionSheet with many buttons do not correctly displayed iOS7

本小妞迷上赌 提交于 2019-12-20 17:41:31
问题 On the iPad new ios 7 UIActionSheet is not correctly displayed with lots of buttons. Not cleaning background of UIActionSheet on scrolling. The buttons seem frozen in background UIActionSheet. screenshot with problem My code : UIActionSheet *popupQuery = [[UIActionSheet alloc]; for (int i=0; i<[ParamAllList count]; i++) { NSMutableDictionary *Param = [ParamAllList objectAtIndex:i]; [popupQuery addButtonWithTitle:[Param valueForKey:@"name"]]; [[[popupQuery valueForKey:@"_buttons"]

Change Action sheet popover arrow in iOS8

試著忘記壹切 提交于 2019-12-20 17:26:33
问题 i'm using UIAlertController . But on iPad with iOS 8, actionSheet show with popover arrow. Any ideas to hide that arrow? Here is my code: UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller" message:@"yeah" preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action") style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { NSLog(@

How to put an image on UIActionSheet?

坚强是说给别人听的谎言 提交于 2019-12-20 07:54:58
问题 How to put image on UIActionSheet on right position of text. Like given in apple music player. Note: Don't answer with custom view, if it is possible in UIActionSheet , Kindly let us know. 回答1: Don't answer with custom view Then you are effectively forbidding anyone to answer, because that is what you do . First of all, there is no such thing as UIActionSheet. It was deprecated four years ago. Today we use UIAlertController. UIAlertController is nothing but a prepackaged presented view

iPhone, Obj-C, How can I use in app email from an actionsheet button click while using addSubview?

Deadly 提交于 2019-12-20 07:46:22
问题 I found some great example code some months ago to add a compose button to a view to allows emails to be sent within an app... http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/ However, I want to be able to show the email, have it handled for use with any of my views. I have a standard class / method to show the actionsheet, so I can use it in all my views. This is the code from another button in my class. -(UIViewController *)showHelpClickButtonAtIndex:(int)buttonIndex:

UIActionSheet in swift puts Cancel button top in iOS 7

ε祈祈猫儿з 提交于 2019-12-19 13:04:10
问题 I am in the process of rewriting my app from objective c to Swift and I noticed that UIActionSheet behaves differently in Swift version than in obj-c version. Obj-c version Swift version This is a problem only on iOS 7, it works fine (meaning the cancel is on the bottom) on iOS 8 for both Swift and Obj-c versions Here is relevant piece of code: var sheet = UIActionSheet(title: nil, delegate: self, cancelButtonTitle: "Cancel", destructiveButtonTitle: nil) sheet.addButtonWithTitle("Camera")

Swift UIActionSheet crashes on iPad?

独自空忆成欢 提交于 2019-12-19 10:04:36
问题 I m currently running into complete frustrations as i can't find any error, but my ActionSheet crashes on iPad but works well on iPhone here is the code of the action if (view.annotation.title as String!) == "San Francisco" { currentLat = 37.615223 currentLong = -122.389977 url = "www.google.de" let action:UIActionSheet = UIActionSheet(title: "Change Map Type", delegate: self, cancelButtonTitle: "Back", destructiveButtonTitle: nil, otherButtonTitles: "Product Page", "Video") action.showInView

Showing a UIActionSheet

微笑、不失礼 提交于 2019-12-19 06:55:59
问题 I was wondering how to show a UIActionSheet from the bottom of the screen. I have tried using the showInView: method with MainView as the view to show it in but I get the MainView Undeclared error. 回答1: You need to reference the controllers view: [actionSheet showInView:self.viewController.view] 回答2: If you attempt to show the UIActionSheet on the window though you use TabBar or ToolBar UI, The bottom part of the ActionSheet doesn't respond to your touch. You'd be better to use as follows: [[

Xcode : sharing content via Action Sheet

心不动则不痛 提交于 2019-12-18 11:44:14
问题 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. 回答1: It is not in UIActionSheet it is in UIActivityController , which is the default function in iOS. objective-C - (void)presentActivityController:

UIAlertController handle dismiss upon click outside (IPad)

眉间皱痕 提交于 2019-12-17 18:17:59
问题 Previous to iOS8 we used the UIActionSheet for showing alert and now we need to use the UIAlertController. When we used the UIActionSheet we could easily handle situations where the user clicked outside the pop up (which means he want to cancel the operation) by comparing the clickedButtonAtIndex to the cancelButtonIndex - if the user indeed pressed outside the popup we got the cancel button index in this function. How can we handle these situations with the new UIAlertController? I tried to