1.cell選中與取消選中時,都會調用下面方法:spa
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; self.selectSymbol.hidden = !selected; //可在此處隱藏與顯示某些控件 }
2.當cell的selection爲None時, 即便cell被選中了, 內部的子控件也不會進入高亮狀態code
self.textLabel.highlightedTextColor = XMGRGBColor(219, 21, 26);//cell的selection不爲None時,選中後,內部子控件默認進入高亮狀態。能夠根據這一屬性設置cell選中時文本的顏色
3.cell內的控件有時可能會發生重疊,擋住的狀況,能夠這一解決:blog
- (void)layoutSubviews{ [super layoutSubviews]; self.textLabel.y -= 1; self.textLabel.height -= 2;//好比textLabel遮住了自定義的底部分割線 }
4.當須要一些耗時操做,能夠設置小菊花控件it
UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[loadingView startAnimating]; self.accessoryView = loadingView;