Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
选择单元格后,我可以这样做来更改颜色:
cell.myLabel.highlightedTextColor = [UIColor redColor];
但是如何在按下单元格时将其更改为该颜色?
无法按下单元格。为了获得相同的功能,只需在您的自定义单元格中添加一个按钮(将其保持在隐藏状态)。然后简单地初始化并建立连接。然后
if(cell.myButton isSelected YES) { //write code to get details about that particular cell whic is selectd!! cell.myLabel.highlightedTextColor = [UIColor redColor]; }