prepareForSegue and delegates

后端 未结 2 1702
执笔经年
执笔经年 2021-02-14 08:58

I have an application with two segues. In one of the segues, the current view controller becomes a delegate and the other does not.

- (void)prepareForSegue:(UIS         


        
2条回答
  •  再見小時候
    2021-02-14 09:39

    The delegate is largely irrelevant in the context of your question.

    Your first segue's destination is a navigation controller, which contains the view controller you are really interested in. Therefore to get to that view, you need to go through the navigation controller since that won't have any properties you are interested in setting.

    Your second segue goes directly to a single view controller, so you can access it directly.

提交回复
热议问题