Wednesday, 4 May 2011

Sample transition code

For a 'horizontal flip' style transition:

CapturedPhotoController *cont = [[CapturedPhotoController alloc] initWithNibName:@"CapturedPhotoController" bundle:nil];
cont.fugitive = fugitive;
cont.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self.navigationController presentModalViewController:cont animated:YES];
[cont release];



Normal transition with 'back' button on top:

FugitiveDetailViewController *fugitiveDetailViewController = [[FugitiveDetailViewController alloc] initWithNibName:@"FugitiveDetailViewController" bundle:nil];
fugitiveDetailViewController.fugitive = [self.resultsController objectAtIndexPath:indexPath];
[self.navigationController pushViewController:fugitiveDetailViewController animated:YES];
[fugitiveDetailViewController release];

No comments:

Post a Comment