Adding a delegate method when pushing view controllers.