uitabbaritem 图片居中
来源:互联网 发布:中国社交网络排名 编辑:程序博客网 时间:2024/06/06 12:24
在TabBarItem设计的时候不需要title只要image的时候,如何将image居中显示。
tabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
这边用到的是TabBarItem的imageInsets属性:
UIEdgeInsets设置偏移量UIEdgeInsetsMake(CGFloat top, CGFloat left, CGFloat bottom, CGFloat right)
这边重要的一点是,top和bottom要设置成相反数,不然image的大小会一直改变。
0 0
- uitabbaritem 图片居中
- UITabBarItem 只有图片,没有文字,图片居中
- 设置UITabbarItem字体颜色和图片居中
- Swift - 让标签栏按钮UITabBarItem图片居中(没有文字)
- 关于uitabbaritem图片显示
- [iOS]类似新浪微博或者人人客户端中,中间UITabBarItem只有图片,使图片居中的方法
- iOS开发- UITabBarItem自定义图片
- UITabBarItem显示真实自定义图片
- UITabBarItem
- UITabBarItem
- iOS开发- UITabBarItem自定义图片(去除灰色)
- UIBarButtonItem 、UITabBarItem 改变字体,大小,图片
- UITabBarItem中图片和文字的设置
- UITabBarItem不能显示文字和图片
- Swift开发教程--如何让UITabBarItem垂直居中显示
- 图片居中
- 图片居中
- IOS 7修改UITabbar背景图片、UITabBarItem图片以及UITabBarItem的文字颜色.
- 观察者模式
- 红糖水与白糖水的交换
- android:stateNotNeeded
- Attempting to badge the application icon but haven't received permiss
- lua string库模式匹配
- uitabbaritem 图片居中
- 【Android 多媒体开发】 MediaPlayer 状态机 接口 方法 解析
- 解决Linux下安装thrift出现的Building Java Library ........ : no问题(以及其他安装thrift出现的问题)
- Android相关属性的介绍:android:exported
- 自定义圆形ImageView
- 【Spring学习笔记一】-Spring配置和简单实例
- minifilter引发的杀毒“案”
- 基于item协同过滤算法实现
- Servlet验证码