cell.accessoryType 在 tableView cellForRowAtIndexPath... 方法中不起作用 [英] cell.accessoryType not workinkg in tableView cellForRowAtIndexPath... method

查看:24
本文介绍了cell.accessoryType 在 tableView cellForRowAtIndexPath... 方法中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在导航控制器中有一个 tableView

I have a tableView inside a Navigation Controller

我想改变背景,我使用

[[self view] setBackgroundColor:SomeColor];

在控制器类的-awakeFromNib方法中

如果SomeColor"是黑色的,我看不到 cell.accessoryType (UITableViewCellAccessoryDisclosureIndicator).

if "SomeColor" is black I cannot see the cell.accessoryType (UITableViewCellAccessoryDisclosureIndicator).

有没有办法让它变白?

我尝试在 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 方法中设置 cell.accessoryType = UITableViewCellAccessoryDe​​tailDisclosureButton; 但什么都没发生,我是不是遗漏了什么?

I try to set cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; in the - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath metod but nothing happens, am I missing something?

推荐答案

尝试在 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 中做{如果 table view 是plained.

Try to do it in - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if the table view is plained.

这篇关于cell.accessoryType 在 tableView cellForRowAtIndexPath... 方法中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆