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]];

  • 相关阅读:
    MySQL
    关于多因子选股模型的常见问题
    T100 GR 报表常见知识点 (含套版制作)
    Oracle Round 函式 (四捨五入)
    Oracle的字串處理
    改變帳款性質別以利排序沖帳才不會有問題,把19->17,把12->17
    財務月結結帳相關檢核程式
    t100 常用公用變數
    一、自动驾驶行业概述(第一课,新认识)
    第一章 软件体系结构概论
  • 原文地址:https://www.cnblogs.com/chongyu/p/5192436.html
Copyright © 2011-2022 走看看