Where should I set UINavigationController's delegate property?
问题 I'm working with some custom controller transitions, which make use of UINavigationController's delegate property. If I set it in viewDidLoad() , self.navigationController?.delegate gets deallocated at some point after the push. Setting it in viewWillAppear() works, but I'm wondering why that property gets deallocated in the first place, and where people typically set this property. // The first time you push, it will work correctly, and the delegate function below is called. After you pop