Bugfix for a push animation warning appearing when presenting feedback view in a popover and requiring userdata

This commit is contained in:
Andreas Linde 2013-06-04 02:13:37 +02:00
parent 407c04b384
commit 6960618748

View File

@ -93,7 +93,7 @@
[[NSNotificationCenter defaultCenter] removeObserver:self name:BITHockeyFeedbackMessagesLoadingStarted object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:BITHockeyFeedbackMessagesLoadingFinished object:nil];
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showDelayedUserDataViewController) object:nil];
}
@ -197,10 +197,12 @@
) {
self.userDataComposeFlow = YES;
BITFeedbackUserDataViewController *userController = [[BITFeedbackUserDataViewController alloc] initWithStyle:UITableViewStyleGrouped];
userController.delegate = self;
[self.navigationController pushViewController:userController animated:YES];
// In case of presenting the feedback in a UIPopoverController it appears
// that the animation is not yet finished (though it should) and pushing
// the user data view on top of the navigation stack right away will
// cause the following warning to appear in the console:
// "nested push animation can result in corrupted navigation bar"
[self performSelector:@selector(showDelayedUserDataViewController) withObject:nil afterDelay:0.0];
} else {
[self.tableView reloadData];
}
@ -217,6 +219,13 @@
#pragma mark - Private methods
- (void)showDelayedUserDataViewController {
BITFeedbackUserDataViewController *userController = [[BITFeedbackUserDataViewController alloc] initWithStyle:UITableViewStyleGrouped];
userController.delegate = self;
[self.navigationController pushViewController:userController animated:YES];
}
- (void)setUserDataAction:(id)sender {
BITFeedbackUserDataViewController *userController = [[BITFeedbackUserDataViewController alloc] initWithStyle:UITableViewStyleGrouped];
userController.delegate = self;