天天看点

iOS实战演练之对于present出来的UINavigationController返回的问题

       如题,现在我们控制页面present到一个UINavigationController页面去

SCMyCardDesignCollectionViewController  *vc = [[SCMyCardDesignCollectionViewController alloc]initWithCollectionViewLayout:layout];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
           

SCMyCardDesignCollectionViewController.m

       注意“返回”一定要写在返回按钮所在的ViewController页面中

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem