Commit d00ab602400133796b6350efdc2b731ee1d02702

Authored by yanglingyu
1 parent 01f8ba47

防连点操作遗漏问题处理

CNLiveScioLive/Pages/Tools/Category/UINavigationController+PushOneVC.m
... ... @@ -23,9 +23,12 @@
23 23 -(void)CN_pushViewController:(UIViewController *)viewController animated:(BOOL)animated
24 24 {
25 25 if ([self.viewControllers.lastObject isKindOfClass:[viewController class]]) {
26   - return;
27   - }
  26 + NSMutableArray *controllersAry = [NSMutableArray arrayWithArray:self.viewControllers];
  27 + [controllersAry replaceObjectAtIndex:self.viewControllers.count-1 withObject:viewController];
  28 + [self setViewControllers:controllersAry animated:YES];
  29 + }else{
28 30 self.modalPresentationStyle = UIModalPresentationFullScreen;
29 31 [self CN_pushViewController:viewController animated:YES];
  32 + }
30 33 }
31 34 @end
... ...