I'm having a strange graphical glitch in my app when I use swiping to go back to the previous view.
When I swipe normally and complete the swipe gesture, everyting works fine.
When I cancel the swipe gesture, that is: starting the gesture but then move your finger in the opposite direction to stop the gesture and stay at the current view.
The glitch I'm getting that If I then go back to the previous screen, the barbutton items of that view overlap with the barbutton items from the previous view.
Screenshots:
Starting point:
Swiping back gesture and complete gesture, go to previous view, works correctly:
Swiping back gesture and cancel gesture, thus stay on current screen, then go back to the previous screen, the text buttons overlap:
This graphical glitch only disappears when force quitting the app and restarting it. But of course if you provoke the glitch again, it appears again.
Hope there are some developers that had the same problem.
Edit, cause of problem is the following code:
- (void)resetCacheAndRefreshTableAnimated:(BOOL)animated {
[NSFetchedResultsController deleteCacheWithName:kCDFollowedCacheName];
[self setSortDescriptorsForFetchRequest:self.fetchedResultsController.fetchRequest];
NSError *error = nil;
[self.fetchedResultsController performFetch:&error];
[self.tableView reloadData];
}
This method is called in ViewWillAppear. When method call is removed, problem goes away. Any idea?