gpt4 book ai didi

ios - UIAlertView 不是每次都弹出

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

我有一个 TableView ,我有一个方法,每次单击一行时都会调用该方法。但问题是,前几次我点击这些行没有任何反应,大约 3 次后它按预期工作。什么会导致这个?这是代码:

    - (void) tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hey, do you see the disclosure button?"
message:@"Touch that to drill down instead"
delegate:nil
cancelButtonTitle:@"Won't happen again"
otherButtonTitles: nil];
[alert show];

}

最佳答案

您实现了didDeselectRowAtIndexPath

应该是

- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

关于ios - UIAlertView 不是每次都弹出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14997499/

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