Reputation: 17169
In my iPhone app, I have a custom UIViewController
class setup which adds some UIImageView
s and things.
How can I access this class via my main UIViewController
and, for example, call a method from that outside class and have it add those UIImageView
s to the view?
Upvotes: 1
Views: 36
Reputation: 29767
Make property and public methods, after that you can call them in target viewcontroller.
p.s. But I never used this approach because it breaks controller's logic. Instead of I usually use some managers which has all required methods. (DBManager, NetworkManager, etc)
Upvotes: 1