UITableView Group 样式下边框宽度并禁止滚动视图
来源:互联网 发布:使用js做gis地图 编辑:程序博客网 时间:2024/06/16 10:34
在使用UITableView的Group样式的时候,运行后会发现在TableView视图的上下左右均有一个边框,效果图如下:
我们看图中右上角部分,该部分为一个UITableView,其采用Group样式,在该视图的四周填充了空白背景,同时该视图还可以被上下拉动,此处我们不想在左上角图片与tableview之间保留空白,也不想让视图上下存在空白,更不想让该视图能够被上下移动(滚动),最终实现效果为:
具体代码如下:
1、消除TableView上下空白代码
tableViewHead.sectionHeaderHeight=0; //消除头部空白
tableViewHead.sectionFooterHeight=0; //消除尾部空白
运行效果图如下:
2、消除左边空白
tableViewHead.backgroundColor=[UIColorclearColor];//此代码可以把左边的空白去掉
运行效果图
3、消除视图的拉动(滚动)
上面但从运行效果看已经基本符合要求,但是我们可以上下滚动该视图,会看到大部分的空白(见下图)
tableViewHead.scrollEnabled=NO;//该代码禁止TableView滚动
希望此博文能够对初学者或者有相同需求的爱好者能够有所帮助。
- UITableView Group 样式下边框宽度并禁止滚动视图
- 禁止UITableView滚动
- 禁止UITableView滚动
- iOS UITableView禁止滚动
- 去掉UITableView中Group样式cell的边框目前最完美方法
- 去掉UITableView中Group样式cell的边框目前最完美方法
- 设置视图圆角,边框宽度/颜色
- iOS 禁止UITableView区头滚动
- UITableView的Group样式的详细使用
- UITableview Group 与plain 样式区别
- css 设置网页边框滚动条样式
- 禁止显示滚动视图底部多余空白
- QWidget设置边框(样式,宽度及颜色)
- 限定GridView宽度并加上滚动条
- UITableView 一直显示滚动条(ScrollBar Indicators)、滚动条Width(宽度)、滚动条Color(颜色)
- UITableView 一直显示滚动条(ScrollBar Indicators)、滚动条Width(宽度)、滚动条Color(颜色)
- UITableView 一直显示滚动条(ScrollBar Indicators)、滚动条Width(宽度)、滚动条Color(颜色)
- UITableView 一直显示滚动条(ScrollBar Indicators)、滚动条Width(宽度)、滚动条Color(颜色)
- Android编译中GCC版本问题
- Principal Software Engineer
- Android BaseExpandableListAdapter 例子
- Senior Storage Analyst
- USD Escalation Engineering - Software Engineer
- UITableView Group 样式下边框宽度并禁止滚动视图
- Asp.net的设计思想
- Windows Azure Platform (五) Windows Azure Platform
- Struts2 常量设置
- BRSDC - (Sr.) Solution Validation Specialist
- 动态生成html的<ul><li>列表项的算法
- ESG/e-Lab/ Principal Systems Integration Engineer
- 判断用户界面是ipad的还是phone的代码
- IIG platform - Senior Lab Management Engineer