gpt4 book ai didi

ios - TableView :performAction:forRowAtIndexPath:withSender delegates show warning

转载 作者:行者123 更新时间:2023-11-28 22:18:46 26 4
gpt4 key购买 nike

在我的代表中它显示警告

- (BOOL)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender
{
return YES;
}

警告:'tableView:performAction:forRowAtIndexPath:withSender:' 的实现中的返回类型冲突:'void' 与 'BOOL'(又名。'signed char')

指导我解决这个警告

最佳答案

根据协议(protocol)的要求,将返回类型设置为void:

- (void)tableView:(UITableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender

您可能混淆了返回 voidtableView:performAction:forRowAtIndexPath:withSender: 方法与 tableView:canPerformAction:forRowAtIndexPath:withSender: code> 方法,它返回 BOOL

关于ios - TableView :performAction:forRowAtIndexPath:withSender delegates show warning,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20963794/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com