Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case timezoneSetting: {
- UIViewController *pickerViewController = (setting.type == timeSetting) ?
- [[[TimePickerViewController alloc] initWithSetting:setting] autorelease] :
- [[[TimeZonePickerViewController alloc] initWithSetting:setting] autorelease];
- if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
- CGRect frame = [self.tableView rectForRowAtIndexPath:indexPath];
- CGRect cellRect = CGRectMake(frame.origin.x, frame.origin.y - tableView.contentOffset.y, frame.size.width, frame.size.height);
- [pickerPopover setContentViewController:[[[UINavigationController alloc] initWithRootViewController:pickerViewController] autorelease]];
- [pickerPopover presentPopoverFromRect:cellRect inView:self.view permittedArrowDirections:(UIPopoverArrowDirectionRight | UIPopoverArrowDirectionUp) animated:YES];
- }
- else {
- [self.navigationController pushViewController:pickerViewController animated:YES];
- }
- break;
- }
Add Comment
Please, Sign In to add comment