Reputation: 83
My requirement is I declared a function in NSObject class I want to use that function in one firstviewcontroller suppose if I want to use that function in secondviewcontroller again firstviewcontroller will call how I can divide those two viewcontrollers in NSObject class can any one tell me?
Upvotes: 0
Views: 550
Reputation: 404
You can implement same function in both viewcontrollers with the implementation of protocol. And you can get reference of one viewcontroller in other view controller by using class level method which will return instance of that view controller.
Upvotes: 1