uiactionsheet

How to customize UIAlertController with UITableView or is there any default control available like this UI in Pages app?

痞子三分冷 提交于 2019-12-03 11:55:53
问题 I would like to implement a UIAlertViewController like this (Reference: Pages and Keynote app): . I have implemented a custom tableview and presented the view by mimicking the UIAlertViewController . But I cannot achieve a similar UI as above. Is there any default controller available for this? -(void)share:(id)sender { [self setModalPresentationStyle:UIModalPresentationCurrentContext]; AlertViewController *renameCntrl = [self.storyboard instantiateViewControllerWithIdentifier

iPad's UIActionSheet showing multiple times

梦想与她 提交于 2019-12-03 11:55:22
I have a method called -showMoreTools: which is: - (IBAction) showMoreTools:(id)sender { UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:@"Close" otherButtonTitles:@"Add Bookmark", @"Add to Home Screen", @"Print", @"Share", nil]; popupQuery.actionSheetStyle = UIActionSheetStyleDefault; popupQuery.dismiss [popupQuery showFromBarButtonItem:moreTools animated:YES]; [popupQuery release]; } When an user taps a UIBarButtonItem it displays that UIActionSheet , but then, if the user wants to close the UIActionSheet without

IOS中UIActionSheet使用详解

北城余情 提交于 2019-12-03 09:55:47
IOS中UIActionSheet使用方法详解 一、初始化方法 - ( instancetype )initWithTitle:( NSString *)title delegate:( id < UIActionSheetDelegate >)delegate cancelButtonTitle:( NSString *)cancelButtonTitle destructiveButtonTitle:( NSString *)destructiveButtonTitle otherButtonTitles:( NSString *)otherButtonTitles, ...; 参数说明: title:视图标题 delegate:设置代理 cancelButtonTitle:取消按钮的标题 destructiveButtonTitle:特殊标记的按钮的标题 otherButtonTitles:其他按钮的标题 二、常用方法和属性介绍 @property ( nonatomic , copy ) NSString *title; 设置标题 @property ( nonatomic ) UIActionSheetStyle actionSheetStyle; 设置风格,枚举如下: typedef NS_ENUM(NSInteger, UIActionSheetStyle) {

Xcode iPad UIActionSheet with many buttons do not correctly displayed iOS7

99封情书 提交于 2019-12-03 06:09:20
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"] objectAtIndex:[[popupQuery valueForKey:@"_buttons"] count]-1] setImage:[UIImage imageNamed:@"add40icon.png"]

How to add UIActionSheet button check mark?

我们两清 提交于 2019-12-03 06:08:57
I wonder how to add check mark to the right of actionSheet button the simplest way? Bellow is a screenshot of Podcasts app. 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]; UIAlertAction *firstButton = [UIAlertAction actionWithTitle:@"First Button" style:UIAlertActionStyleDefault

UIActionSheet buttonIndex values faulty when using more than 6 custom buttons?

柔情痞子 提交于 2019-12-03 05:40:37
问题 I have discovered a strange problem when using UIActionSheet on the iPhone (iOS 4.2). Consider this code: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self.window addSubview:viewController.view]; [self.window makeKeyAndVisible]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"TestSheet" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: nil]; [actionSheet

How to customize UIAlertController with UITableView or is there any default control available like this UI in Pages app?

醉酒当歌 提交于 2019-12-03 05:35:48
I would like to implement a UIAlertViewController like this (Reference: Pages and Keynote app): . I have implemented a custom tableview and presented the view by mimicking the UIAlertViewController . But I cannot achieve a similar UI as above. Is there any default controller available for this? -(void)share:(id)sender { [self setModalPresentationStyle:UIModalPresentationCurrentContext]; AlertViewController *renameCntrl = [self.storyboard instantiateViewControllerWithIdentifier:AlertTblViewidentifier]; renameCntrl.optionViewDelegate = self; renameCntrl.providesPresentationContextTransitionStyle

Change Action sheet popover arrow in iOS8

三世轮回 提交于 2019-12-03 04:43:47
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(@"Cancel action"); }]; UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @

Password protect iPhone app

牧云@^-^@ 提交于 2019-12-03 01:15:43
问题 I'm starting a new app, and I'd like to know how to require a password to open it. I was considering a UIActionSheet in the application didFinishLaunchingWithOptions method of the app delegate implementation file, but am unsure how to go about doing so. I'm going to keep trying though. Found this video, which seems pretty helpeful. Now I've got my UIActionSheet to pop up displaying "Enter password," and am trying to figure how to add a keypad to the action sheet. 回答1: I think you may have

Password protect iPhone app

自古美人都是妖i 提交于 2019-12-02 16:32:07
I'm starting a new app, and I'd like to know how to require a password to open it. I was considering a UIActionSheet in the application didFinishLaunchingWithOptions method of the app delegate implementation file, but am unsure how to go about doing so. I'm going to keep trying though. Found this video , which seems pretty helpeful. Now I've got my UIActionSheet to pop up displaying "Enter password," and am trying to figure how to add a keypad to the action sheet. pendor I think you may have better luck using a full UIViewController instance instead of a UIActionSheet . Adding keyboard