so I've spent an ungodly amount of time trying to create a Date Picker Action Sheet (so it looks better than a regular full screen view) and it just does not want to load in the right place. Currently, the action sheet pops up with about 25% (maybe just the height of the tab bar) clipped.
I've taken a look at almost every StackOverflow topic I could find, which means I've tried creating a pointer to my appdelegate and performing showInView:[[appdelegate window] view] as well as showFromTabBar:[self tabBarController] tabBar and showFromTabBar[self parentViewController] tabBarController] tabBar]. Every permutation of showInView or showFromTabBar results in the date picker being shifted down approximately the height of the tab bar.
Just to clarify, the view that I am launching the Action Sheet from is a view within a nav bar within a tab bar.
UIActionSheet *dateSheet = [[UIActionSheet alloc] initWithTitle:@"Action Sheet Message"
delegate:self
cancelButtonTitle:@"nil
destructiveButtonTitle:@nil
otherButtonTitles:nil];
UIDatePicker *datePicker = [[[UIDatePicker alloc] init] autorelease];
[dateSheet addSubview:datePicker];
[dateSheet showFromTabBar:[[self tabBarController]tabBar]];
[dateSheet release];
If anyone could give me an idea of what I'm doing wrong, it would be highly appreciated.
Thanks.