UITableViewCell,一些不固定显示的控件,动态隐藏有时会显示不正确的解决办法。

hidden不能只写在自定义的cell类中,而是在判断条件中进行,不需要隐藏的重新设置为显示。 

if (model.voice == nil) {

            cell.textContent.text = model.synopsis;

            cell.textContent.hidden = NO;

            cell.textContent.text = model.synopsis;

        } else {

            cell.textContent.hidden = YES;

            cell.playBubble.hidden = NO;

            cell.playBubble.contentURL = [NSURL URLWithString:model.voice];

        }

 

posted @ 2016-02-01 11:27  YouNeedCourage  阅读(607)  评论(0编辑  收藏  举报