zoukankan      html  css  js  c++  java
  • xib、stroyboard加载view、viewController

    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];
    
  • 相关阅读:
    算法53----换钱的最小次数和方法数【动态规划】
    算法52-----矩阵最小路径【动态规划】
    Data
    Git
    Git
    Git
    Git
    DevOps
    Docker
    Tools
  • 原文地址:https://www.cnblogs.com/bachl/p/4808364.html
Copyright © 2011-2022 走看看