“Pushing the same view controller instance more than once is not supported” exception

前端 未结 13 1074
独厮守ぢ
独厮守ぢ 2020-12-02 17:04

I am using the following code to retrieve some messages and putting them into my inbox.

MyInboxVC *inboxVC=[MyInboxVC get ];
//upload all the pending messag         


        
13条回答
  •  时光取名叫无心
    2020-12-02 17:19

    It means you are pushing the same viewcontroller object to stack again when it's already in there.

    [self.navigationController pushViewController:viewControllerObj animated:NO];
    
    [self.navigationController pushViewController:viewControllerObj animated:NO];
    

    check if u r pushing inside a loop or if u've accidentally placed the code more than one time..

提交回复
热议问题