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

前端 未结 13 1084
独厮守ぢ
独厮守ぢ 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:32

    It means that the ViewController returned from [MyInboxVC get] is already in the navigation stack of devNavController. You can not add the same object to the stack multiple times.

    Apparently, you already have a MyInboxVC pushed earlier. Insure that you've popped it when it was no longer needed.

    That's the "what's it mean" answer, but don't have enough info to know what you need to do to fix it.

    My guess is your Navigation Stack is growing larger than you are expecting, meaning you are not popping as often as you should.

提交回复
热议问题