美文网首页
UITableView

UITableView

作者: himyfairy | 来源:发表于2016-05-12 11:28 被阅读12次

1.从一个控制器pop出来后,取消cell的选中状态

  • 如果当前控制器是UITableViewController:
self.clearsSelectionOnViewWillAppear = YES;
  • 如果当前控制器不是UITableViewController,在viewWillAppear中,需要手动取消选中:
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES];
Simulator Screen Shot 2016年5月17日 13.43.31.png

相关文章

网友评论

      本文标题:UITableView

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