获取故事板对象操作

阅读更多
//获取故事板,跳转对象
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"showOrderInfoViewController"]) {
        UINavigationController *view = segue.destinationViewController;
        OrderInfoViewController *orderInfoViewController = (OrderInfoViewController *)view.topViewController;
        orderInfoViewController.order = selectOrder;
    }
}

 

//获取故事板的某个UIViewController    
UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
// 获取故事板中某个View
UIViewController *next = [board instantiateViewControllerWithIdentifier:@"SelectCarTableViewControllerRoot"];

 

 

你可能感兴趣的:(Objective-C)