zoukankan      html  css  js  c++  java
  • iOS开发>学无止境

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

        self.window.backgroundColor = [UIColor whiteColor];

    UITabBarController *mainTabBar = [[UITabBarController alloc] init];

        UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kMFMainWidth, 49)];

        backView.backgroundColor = kMFMyRed;

        [mainTabBar.tabBar insertSubview:backView atIndex:0];

        mainTabBar.tabBar.opaque = YES;

        

        MFMainPageViewController *mainPage = [[MFMainPageViewController alloc] init];

        mainPage.tabBarItem.title = @"首页";

    // 选中及未选中的图标

         [mainPage.tabBarItem setFinishedSelectedImage:[[UIImage imageNamed:@"home_tabBar_home_icon_sel"]

                                                        imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]

                           withFinishedUnselectedImage:[[UIImage imageNamed:@"home_tabBar_home_icon_nor"]

                                                        imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];

        UINavigationController *mainPageNav = [[UINavigationController alloc] initWithRootViewController:mainPage];

    //设置字体显示颜色

        [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],

                                                           UITextAttributeTextColor,

                                                           nil]

                                                 forState:UIControlStateNormal];

        [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:kMFMyAuratus,

                                                           UITextAttributeTextColor,

                                                           nil]

                                                 forState:UIControlStateSelected];

        self.window.rootViewController = mainTabBar;

        

        [self.window makeKeyAndVisible];

    本内容来自: 超越昨天(学无止境) - http://www.cnblogs.com/xvewuzhijing/
  • 相关阅读:
    图的深度优先遍历(邻接表,递归,非递归)
    图的深度优先遍历(邻接矩阵,递归,非递归)
    【转】C语言邻接表的实现
    图的存储
    堆排序_C实现
    快排_C实现
    交换二叉树中所有结点的左右子树的位置
    二叉树层次遍历_判断结点所属层次
    二叉树_非递归先中后序_递归非递归求深度
    二叉树非递归遍历(前、中、后)
  • 原文地址:https://www.cnblogs.com/xvewuzhijing/p/4982184.html
Copyright © 2011-2022 走看看