Re: [问题] tableviewcell的indexPath.row

楼主: Jeching1209 (JeChing)   2014-04-01 18:33:38
按照你的描述似乎是在cellForRowAtIndexPath:
这个 delegate 里加 button
最直接解决的方法
在 cell.contentView addSubview: 之前
加入
for (UIView *subview in cell.contentView.subviews) {
[subview removeFromSuperview];
}
试试看吧XD
※ 引述《yoyostar1990 (~Yoyo~)》之铭言:
: 用tableviewcell来显示数据库资料
: 而每笔资料有个button可以选择
: 但有default资料
: default资料不想让他有button
: 不知道要怎么实现
: 原本是使用indexPath.row > 3 才加button
: 但只有刚进去是正确的
: 上下滑动后全部都会加到button
: 感觉好像是indexPath.row会变动的样子
: 加上tag也是一样 滑动后就失败
: 要怎样才能固定呢
作者: nobody1 (无事家中坐)   2014-04-02 01:26:00
酱子不就一直在加来加去??

Links booklink

Contact Us: admin [ a t ] ucptt.com