Showing posts with label Calling AppDelegate Method. Show all posts
Showing posts with label Calling AppDelegate Method. Show all posts

Wednesday, December 9, 2015

How to call an AppDelegate Method from ViewController using Objective C

One of the problem I faced recently was, when I needed to call a user defined method of AppDelegate class from the ViewController where I was working on. I did not want to repeat the same method in my project.

It is a bit different process to call a user defined method from an AppDelegate class from another ViewController class. But it is easy to do and will reduce the redundancy of code. You just need to write one (maximum two) line(s) to call the method from Delegate class.