扫码关注官方订阅号
我在控制器中创建一个tableview,也给这个控制器设置了代理和数据源,可是点击cell没有调用- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
走同样的路,发现不同的人生
建议题主提供更多一些的信息,这样的话根本没法回答啊,比如你是怎么判断没调用的,代理和数据源是怎么设置的?我能想到的可能性就是代理和数据源没设置的不正确。
tableView 的 delegate 设置了吗? 例如:tableView.delegate = self;
tableView.delegate = self;
同意Nobel_Liu的说法,很有可能是没有设置好delegate;另外这个用法你应该会用吧?
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //action }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
建议题主提供更多一些的信息,这样的话根本没法回答啊,比如你是怎么判断没调用的,代理和数据源是怎么设置的?我能想到的可能性就是代理和数据源没设置的不正确。
tableView 的 delegate 设置了吗?
例如:
tableView.delegate = self;同意Nobel_Liu的说法,很有可能是没有设置好delegate;另外这个用法你应该会用吧?