美文网首页
UITableView 点击事件创建UIAlertControl

UITableView 点击事件创建UIAlertControl

作者: 闻醉山清风 | 来源:发表于2017-02-21 16:03 被阅读0次

    UITableViewCell 中 - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath方法中点击弹出UIAlertController会出现延迟,有时需要点击两次才会出现。

    解决方法:

    //设置cell的选中状态为默认状态

    1,cell.selectionStyle=UITableViewCellSelectionStyleDefault;

    //点击方法中设置反选

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

    {

    [tableViewdeselectRowAtIndexPath:indexPathanimated:NO];

    }

    相关文章

      网友评论

          本文标题:UITableView 点击事件创建UIAlertControl

          本文链接:https://www.haomeiwen.com/subject/bajuwttx.html