I have few screens draw programmatically, and i want to add a back button in my UINavigationBar. So i think of something like that:
I have a class that inherits from UIViewController – myViewController. So i’ve made an Array where i store my views (myViewController class objects), and back button simply reload the current screen content to previous screen from array. Is that a good way for doing this?
I have few screens draw programmatically, and i want to add a back button
Share
This is what
UINavigationControlleris for. Use that.Also:
Views and view controllers are entirely different things. If you mix them up, you’re going to have lots of problems.