iOS界面跳转

从一个Controller跳转到另外一个Controller时,通常有如下2种: 
一、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法能够返回。 

    PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init]; 
    [self.navigationController pushViewController: ickImageViewController animated:true]; 
    [ickImageViewController release]; 


二、利用UIViewController自身的presentModalViewController,进行跳转;调用dismissModalViewControllerAnimated方法能够返回。 
    PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init]; 
    [self presentModalViewController:ickImageViewController animated:YES]; 
//返回 
[self dismissModalViewControllerAnimated:YES];it

相关文章
相关标签/搜索