uiactionsheet

how to compose mail when button at index clicked in UIActionSheet?

大憨熊 提交于 2019-12-13 02:59:48
问题 I am a bit confused on how to display mail composer when I click the email option in UIActionSheet . Here's my sample code: -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex == 0) { NSString *emailTitle = @"Test Email"; NSString *messageBody = @"iOS programming is so fun!"; NSArray *toRecipents = [NSArray arrayWithObject:@"support@email.com"]; MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; mc

UIActionSheet from UIAlertView

☆樱花仙子☆ 提交于 2019-12-12 16:12:09
问题 I'm trying to show a UIActionSheet when the user touches a button in a UIAlertView: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { UIActionSheet *actionSheet = ... [actionSheet showFromTabBar:self.tabBarController.tabBar]; } } When the action sheet is shown the alert view is still on the screen behind the action sheet, and when I touch a button in the action sheet - the action sheet disappears but the whole screen is dimmed

Proper way to connect UIActionSheet options to actions

拥有回忆 提交于 2019-12-12 13:26:37
问题 While using a UIActionSheet in an iphone app, the typical methods of matching actions to buttons seem very fragile and aesthetically unpleasant. Perhaps its due to my minimal C/C++ background (more Perl, Java, Lisp and others). Matching on button indexes just seems like too many magic numbers and too disconnected to avoid simple logical or consistency errors. For instance, UIActionSheet *sources = [[UIActionSheet alloc] initWithTitle:@"Social Networks" delegate:self cancelButtonTitle:@"Cancel

Change tint color of UIAlertview and UIActionsheet buttons

耗尽温柔 提交于 2019-12-12 09:37:28
问题 I am trying to adapt my application for iOS 7. The issue I am having is I can not change the tint color of some controls. I did add self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; if (IOS7_OR_LATER) self.window.tintColor = [self greenTintColor]; to my app delegate's - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions It mostly helped but color of message box and action sheet buttons is still

How to display datepicker like that in iOS 7 calendar UIDatePicker

拟墨画扇 提交于 2019-12-12 08:51:11
问题 I'm new to iOS development, learning bits and pieces. I've few more queries in continuation to another thread (iOS7: How does Apple make a navigation controller look like a uiactionsheet in the calendar app) on iOS 7 new event creation in default calendar that's shown when we click + on UINavigationBar (I assume). Does anyone know how to create UIDatePicker so that its displayed/hidden when I click on Start/End date field? I saw one video where UIActionSheet was used in XCode 4.5, but in that

How can I sent an array of strings into an UIActionSheet varargs init method?

你离开我真会死。 提交于 2019-12-12 08:46:18
问题 I have an action sheet with options that vary depending on the circumstances. There are enough different button titles that I would like to construct an array of those button titles first, but I can't figure out how to convert that into the varargs format. I want to do something like this: NSMutableArray *buttonTitles = [NSMutableArray array]; if (condition1) { [buttonTitles addObject: @"Do action 1"]; } if (condition2) { [buttonTitles addObject: @"Do action 2"]; } if (condition3) {

How to display the UIActionSheet view from above Tab Bar Controller?

只愿长相守 提交于 2019-12-12 08:25:53
问题 I need to display the action sheet above the Tab Bar controller. I mean, I would be able to see the Tab Bar controller even the action sheet view is in visible mode. So, Please suggest how to view from above the Tab Bar controller. Is it possible. secondly, How to change the back ground color of action sheet and cancel button back ground colour. Please help me Thank You, Madan Mohan. 回答1: To display an action sheet from a tab bar, you can call the following within the view controller that is

Remove an item from a UICollectionView

和自甴很熟 提交于 2019-12-12 07:39:30
问题 I have a set of images showing in a UICollectionView . When the user taps on an image, it spawns a UIActionSheet with a few options for that image. One of them id removing the photo from the UICollectionView . When the user selects remove button in the UIActionSheet , it pops up an alert view asking for confirmation. If the user selects yes, it should remove the photo. My problem is, to remove the item from the UICollectionView , you have to pass the indexPath to the deleteItemsAtIndexPaths

UIActionSheet Title Multiline

微笑、不失礼 提交于 2019-12-12 04:49:17
问题 Very simply I'd like to have the title of the UI Action Sheet be two lines. See example below. I'd like to make it: (line1) Action (line2) Sheet Demo Still centered and everything just with a carriage return 回答1: so because it takes NSString * you need to use \r UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"First Line\rSecond Line", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"_CANCEL", nil) destructiveButtonTitle:nil otherButtonTitles

Showing UIActionSheet over UIAlertView

守給你的承諾、 提交于 2019-12-12 00:27:53
问题 For a specific server notification I am supposed to show an UIActionSheet. But problem here is when that event comes, at the same time if any UIAlertView already showing on any view controller, it make the UIActionSheet disabled( After pressed ok for alert view I am not able to select anything on view controller , view got disabled because of UIActionSheet). Anyone faced this kind of problem, Any idea how to solve it? I have tried by dismissing alert view before showing action sheet, however