1、Storyboard加载
- (void)addButtonDidClickedAction:(UIButton *)sender{
NSLog(@"%s,%d", __FUNCTION__,__LINE__);
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"main" bundle:nil];
BCCAddJizhangViewController *addJizhangVC = [storyboard instantiateViewControllerWithIdentifier:@"BCCAddJizhangViewController"];
addJizhangVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
addJizhangVC.delegaete = self;
[self presentViewController:addJizhangVC animated:YES completion:nil];
}
2、 代码加载xib---view
NSArray *nibContents = [[NSBundle mainBundle] loadNibNamed:@"BCCJiZhangTitleView" owner:nil options:nil];
BCCJiZhangTitleView *titleView = [nibContents firstObject];
3、代码加载xib---viewController
BCCMingxiCellDetailedViewController *mxVC = [[[NSBundle mainBundle] loadNibNamed:@"BCCMingxiCellDetailedViewController" owner:nil options:nil] lastObject];