• UI基础


       self.window = [[UIWindow alloc] init];
        self.window.frame = [UIScreen mainScreen].bounds;
        oneViewController *oneview = [[oneViewController alloc] init];
        //设置tabbarItem的图片并且设置渲染模式为UIImageRenderingModeAlwaysOriginal(不渲染,使用原始图片) 默认渲染
        oneview.tabBarItem.image = [[UIImage imageNamed:@"tabbar_discover_selected"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        //设置选中控制器的tabbarItem的图片并且设置渲染模式为UIImageRenderingModeAlwaysOriginal(不渲染,使用原始图片) 默认渲染
        oneview.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_discover_os7"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        
        twoViewController *twoview = [[twoViewController alloc] init];
        twoview.tabBarItem.image = [[UIImage imageNamed:@"tabbar_home"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        twoview.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_home_selected_os7"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        
        XJTabBarController *tabC = [[XJTabBarController alloc] init];
        //添加子控制器方式一
    //    [tabC addChildViewController:oneview];
        //添加子控制器方式二
        tabC.viewControllers = @[oneview,twoview];
        
        self.window.rootViewController = tabC;
     
    

      

  • 相关阅读:
    2018/12/08 L1-043 阅览室 Java
    2018/12/08 L1-042 日期格式化 Java
    breeze源码阅读心得
    Spark ML源码分析之四 树
    Spark ML源码分析之三 分类器
    Spark ML源码分析之二 从单机到分布式
    Spark ML源码分析之一 设计框架解读
    Adaboost的意义
    RBM如何训练?
    ChromeTimeline
  • 原文地址:https://www.cnblogs.com/xj76149095/p/5350434.html
Copyright © 2020-2023  润新知