UITableViewCell doesn't get deselected when swiping back quickly

后端 未结 16 1398
甜味超标
甜味超标 2021-01-29 23:49

I\'ve now updated three of my apps to iOS 7, but in all three, despite them not sharing any code, I have the problem where if the user swipes to go back in the navigation contro

16条回答
  •  佛祖请我去吃肉
    2021-01-30 00:29

    I've found a very simple solution to this problem that just makes the default behavior work as it should. I wasn't satisfied with the solutions involving deselectRowAtIndexPath since the resulting visual effect was slightly different.

    All you have to do in order to prevent this weird behavior is to reload the table when the view is displayed:

    - (void)viewDidAppear:(BOOL)animated {
        [super viewDidAppear:animated];
        [self.tableView reloadData];
    }
    

提交回复
热议问题