zoukankan      html  css  js  c++  java
  • UITableView的style详解

    在默认的UITableViewCell中,主要有三个系统控件,分别是两个Lable和一个imageView,两个Label,imageView(始终在最左边)的布局位置可以通过下面4个设置:

    UITableViewCellStyleDefault,// 默认值,只显示textLabel,不显示detailTextLabel

    UITableViewCellStyleValue1,// textLabel靠左并垂直居中,而detailTextLabel靠右且字体为蓝色

    UITableViewCellStyleValue2,// textLabel靠左,而detailTextlabel相对textLabel靠左,imageView无法显示

    UITableViewCellStyleSubtitle//textLabel靠左垂直靠上,detailTextlabel靠左垂直向下

    另外,cell中还可以设置指示器accessoryType,也有4种类型

    UITableViewCellAccessoryNone,                   // 默认不显示

    UITableViewCellAccessoryDisclosureIndicator,    // 指示箭头

    UITableViewCellAccessoryDetailDisclosureButton, // 蓝色指示箭头

    UITableViewCellAccessoryCheckmark  //勾

    当点击cell时,也有3种选中类型selectionStyle,分别是

        UITableViewCellSelectionStyleNone //没有

        UITableViewCellSelectionStyleBlue //选中蓝色,默认

        UITableViewCellSelectionStyleGray //选中灰色

    而对于整个UITableView的style,有两种:

        UITableViewStylePlain,                  // 默认,类似于android的listView

        UITableViewStyleGrouped             // 组

  • 相关阅读:
    bzoj 1016 JSOI2008 最小生成树计数
    bzoj 1070 SCOI2007 修车
    bzoj 1042 HAOI2008 硬币购物
    bzoj 1132 POI2008 Tro
    bzoj 1227 SDOI2009 虔诚的墓主人
    bzoj 1024 SCOI2009 生日快乐
    1103 POI2007 大都市meg
    bzoj 1009:[HNOI2008]GT考试
    noip2006T1 能量项链
    bzoj 1006: [HNOI2008]神奇的国度
  • 原文地址:https://www.cnblogs.com/mapleyuan/p/3298461.html
Copyright © 2011-2022 走看看