zoukankan      html  css  js  c++  java
  • ##DAY9 UITabBarController

    ##DAY9 UITabBarController

    UIViewController的tabBarController

    UIViewController的tabBarItem

    #pragma mark ———————tabBarItem——————————

    UIViewController的tabBarItem属性的属性:

    title 设置显示的文本

    badgeValue 设置显示的角标

    image 设置未点击时的图片

    selectedImage 设置被选中的标签栏的图片

    注意:这里的图片会受tabBarItem的影响

    注意:图片想正常显示,必须是png格式

    #pragma mark ———————UITabBarItem——————————

    三种创建:

    initWithTitle:image:selectedImage:

    initWithTabBarSystemItem:tag:

    initWithTitle:image:tag:

    #pragma mark ———————UITabBarController——————————

    UITabBarController和UINavigationController一样都是继承于UIViewController

    创建:

    init

    属性:

    viewControllers 数组,设置标签视图控制器需要管理的子视图控制器

    selectedIndex 设置标签栏选中的下标

    delegate 代理

    selectedViewController 设置标签栏选中的视图控制器

    tabBar 标签栏

    #pragma mark ———————tabBar——————————

    tabBar的属性:

    <UITabBarDelegate> delegate

    items 数组

    selectedItem

    tintColor

    barTintColor

    其他见头文件

    #pragma mark ——————设置全局外观——————————

    //一键换肤

    //设置全局外观

    //[UITabBar appearance] 找到当前应用的标签栏 UITabBar

    //setTintColor: 修改显示的文本的颜色

    [[UITabBar appearance] setTintColor:[UIColor greenColor]];

  • 相关阅读:
    spring.jar的下载地址
    spring学习(1)
    供求信息网(2)
    编写学生增删改查系统时碰到的问题
    js中innerText/value/innerHTML三个属性的区别
    form的提交方式
    错误记录(1)
    供求信息网
    GYM 101673F(树计数)
    GYM 101673G(dp)
  • 原文地址:https://www.cnblogs.com/chongyu/p/5192436.html
Copyright © 2011-2022 走看看