UITableView的三种accessory扩展

表视图在应用软件开发中会常常用到,应用程序的扩展都是通过选中某行来进行的,但是并不是整 个表视图的每行都会有扩展,所以需要我们以不同的方式去告诉用户。在表视图中是通过一个enum的枚举类型 UITableViewCellAccessoryType来达到这种目的,
UITableViewCellAccessoryType声明如下:
typedef enum {
    UITableViewCellAccessoryNone,                   // don't show any accessory view
    UITableViewCellAccessoryDisclosureIndicator,    // regular chevron. doesn't track
    UITableViewCellAccessoryDetailDisclosureButton, // blue button w/ chevron. tracks
    UITableViewCellAccessoryCheckmark               // checkmark. doesn't track
} UITableViewCellAccessoryType;

我们可以通过得到一个cell,然后给它的属性accessoryType设置相应的value即可。三种格式分别如下图:

UITableView的三种accessory扩展 - tergol - tergol的博客 UITableView的三种accessory扩展 - tergol - tergol的博客 UITableView的三种accessory扩展 - tergol - tergol的博客
NOTE:  UITableViewCellAccessoryDetailDisclosureButton这个对应上面第一个图,称为细节展示按钮,只有点到按钮 图标才会跳转;  UITableViewCellAccessoryDisclosureIndicator  表示扩展指示器,只要选择带有它的某行,就可以实现视图的跳转;
 UITableViewCellAccessoryCheckmark 用户当前选择了某行。    
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值