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.
我需要根据观察到的属性设置 uitableviewCell backgroundColor。如何在观察方法中将行动态设置为灰色或白色,除非有更好的方法可以实现。
我正在观察对象是否有效,此时我使单元格处于活动状态(白色)或不活动(灰色)。
多谢你们
您可以使用获取特定行的单元格
UITableViewCell *cell = [YourTableVIew cellForRowAtIndexPath:[NSIndexPath indexPathForRow:YourROW inSection:YourSection];