storyboard的小知识

 

 

 

 

 

 

View Coontroller在不关联的情况下跳转

//写在button的方法中

//    获得storyBoard当前故事板

            UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

   //   初始化要跳转的页面

                ViewController2 *advertise = [storyboard instantiateViewControllerWithIdentifier:@"ViewController2"];

    

        [self.navigationController pushViewController:advertise animated:YES];

 

posted on 2015-09-08 19:44  一日不见兮  阅读(302)  评论(0)    收藏  举报