Reputation: 17081
is there a way to override viewWillDisappear (or any view controller delegate method for that matter) across ALL of my view controller in my entire app?
To be clear, I would still like to customize each viewWillDisappear method in the view controller's themselves, but basically I'd like to add a line of code to each view controller's viewWillDisappear method without having to do it manually (it's a big project).
Upvotes: 2
Views: 575
Reputation: 5552
I would just make a base ViewController that only overrides the functions you want and then have every viewcontroller in your project inherit from that rather than UIViewController. Also to make your life easier add the #import of your base view controller to your .pch file.
Upvotes: 8