1.设置tabbar背景颜色

 NSArray *controllers = [NSArray arrayWithObjects:nav_main,nav_channle,nav_me, nil];
_tabController.viewControllers = controllers;
_tabController.delegate = self; for (int i=;i<self.tabController.viewControllers.count;i++) {
UIViewController *viewController = [self.tabController.viewControllers objectAtIndex:i];
// 设置tabbar 背景颜色
[viewController.tabBarController.tabBar setBackgroundImage:[UIImage imageWithColor:kTabBarBackgroundColor]];
}

2.ios7.ios6选中 未选中颜色

 [[UITabBarItem appearance]setTitleTextAttributes:@{ UITextAttributeTextColor : cMainColor }
forState:UIControlStateSelected];
[[UITabBarItem appearance] setTitleTextAttributes:@{ UITextAttributeTextColor : cTabUnselect }
forState:UIControlStateNormal];

以下添加font属性

[[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
NSForegroundColorAttributeName : appTintColor
} forState:UIControlStateSelected]; // doing this results in an easier to read unselected state then the default iOS 7 one
[[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
NSForegroundColorAttributeName : [UIColor colorWithRed:. green:. blue:. alpha:]
} forState:UIControlStateNormal];

iOS tabbar 属性的更多相关文章

  1. iOS tabbar 图片,最佳大小方式

    iOS tabbar 图片,最佳大小方式 文档大小 30 *30 retaina 60 *60 最佳大小 48 *32 参考:http://stackoverflow.com/questions/15 ...

  2. 关于iOS Tabbar的一些设置

    事实上iOS Tabbar的可定制性很高,我们没有必要反复造轮子,以下是笔者收集的一些tabbar的经常使用设置.希望对大家有所帮助. 设置tabbar选中颜色 iOS7设置例如以下: [self.t ...

  3. iOS tabbar 自定义小红点 消息显示,定制边框、颜色、高宽

    一般我们需要显示消息数,会利用到系统提供的api UIApplication.sharedApplication().applicationIconBadgeNumber = 10 但如果我们不想显示 ...

  4. iOS中属性与成员变量的区别

    一.类Class中的属性property 在ios第一版中,我们为输出口同时声明了属性和底层实例变量,那时,属性是oc语言的一个新的机制,并且要求你必须声明与之对应的实例变量,例如: @interfa ...

  5. iOS中属性Property的常用关键字的使用说明

    属性关键字的作用 现在我们iOS开发中,基本都是使用ARC(自动引用计数)技术,来编写我们的代码.因此在属性property中我们经常使用的关键字有strong,weak,assign,copy,no ...

  6. iOS的属性声明:retain和strong的区别

    声明属性时用strong或者retain效果是一样的(貌似更多开发者更倾向于用strong).不过在声明Block时,使用strong和retain会有截然不同的效果.strong会等于copy,而r ...

  7. iOS tabbar点击动画效果实现

    正常情况下,我们点击tabbar都只有一个变色效果,但有时候,如果我们想给它添加一个点击动画,该如何做呢? 先上几个效果图: 1.先放大,再缩小 2.Z轴旋转               3.Y轴位移 ...

  8. iOS学习——属性引用self.xx与_xx的区别

    在iOS开发过程中,我们用@proprety声明一个属性后,在代码中我们可以用self.xx与_xx来获取到这个属性.但是一直有一个疑惑,那就是这两个之间有什么区别呢?最初我一直觉得这两个之间没什么区 ...

  9. iOS transform属性的使用

    1.transform属性 在iOS开发中,通过transform属性可以修改UIView对象的平移.缩放比例和旋转角度,常用的创建transform结构体方法分两大类 (1) 创建“基于控件初始位置 ...

随机推荐

  1. join和countDownLatch原理及区别详解

    先上结论 原理 join 原理:在当前线程中调用另一个线程线程 thread 的 join() 方法时,会调用该 thread 的 wait() 方法,直到这个 thread 执行完毕(JVM在 ru ...

  2. 基于委托的C#异步编程的一个小例子 带有回调函数的例子

    我创建的是一个winform测试项目:界面如下: 设置: 下面是代码: using System; using System.Collections.Generic; using System.Com ...

  3. 【征文】Hadoop十周年特别策划——我与Hadoop不得不说的故事

    2016年是Hadoop的十周年生日,在今年,CSDN将以技术和实战为主题与大家共同为Hadoop庆生.其主要内容包含Hadoop专业词典.系列视频技术解析.Hadoop行业实践.线上问答.线下沙龙. ...

  4. top命令中内存参数

    总结:VIRT 虚拟内存中含有共享库.共享内存.栈.堆,所有已申请的总内存空间.RES  是进程正在使用的内存空间(栈.堆),申请内存后该内存段已被重新赋值.SHR  是共享内存正在使用的空间.SWA ...

  5. rpm | yum 安装软件包时key过期

    1.问题: yum -y install docker-io Loaded plugins: fastestmirror, refresh-packagekit, security Setting u ...

  6. 从【MySQL server has gone away】说起

    本文目的 这几天开发了一个PHP CLI程序,用于后台定时调度执行一些任务.此脚本采用了PHP的多进程(pcntl_fork),共享内存和信号量进行IPC和同步.目的是将串行的任 务并行执行,缩短执行 ...

  7. CCNA2.0笔记_Trunk&EtherChannel

    show interfaces trunk //查看Trunk信息 show interfaces fastEthernet 0/1 //查看接口二层信息 show interfaces fastEt ...

  8. JdbcTemplate中的exectue和queryForList方法的性能对比

    @Autowired JdbcTemplate jdbcParam; pstm =                 jdbcParam.getDataSource()                ...

  9. 【Mac + Appium + Python3.6学习(五)】之常用的Android自动化测试API总结

    Github测试样例地址:https://github.com/appium-boneyard/sample-code/tree/master/sample-code/examples ①定位text ...

  10. python笔记- 发送邮件

    依赖: Python代码实现发送邮件,使用的模块是smtplib.MIMEText,实现代码之前需要导入包: import smtplib from email.mime.text import MI ...