dismissViewController: not working

前端 未结 3 1571
梦谈多话
梦谈多话 2021-02-04 18:44

I have a view controller called vc0 which is presented like this:

[self presentViewController: vc1 animated: YES completion: nil];

And in vc1 I

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 19:27

    First View:

    Firstly embed in navigation controller in first view. and use this code to navigate to another view

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil]; 
    FirstView *rvc = [storyboard instantiateViewControllerWithIdentifier:@"apps"];
    [self.navigationController pushViewController:rvc animated:YES];
    

    Second view:

    Add this line in the method for dismiss view

    - (IBAction)back{
        [self.navigationController popViewControllerAnimated:YES];
    }
    

提交回复
热议问题