I’m writing an iPhone app in Xcode.
I want to create an object of the type UIButton (NewButton) in one viewcontrollers view (viewController1) and than I want to move it to another viewControllers view (viewController2).
Any suggestions on how I do that?
Thanks in advance 🙂
There are many ways to pass the object which depend on the situation.
The most common ways to do that are either delegates or notifications.
An example of delegates:
http://iosdevelopertips.com/objective-c/the-basics-of-protocols-and-delegates.html
An example of notifications:
http://www.hivestudio.cat/index.php?option=com_content&view=article&id=54:technical-note-communicate-using-nsnotificationcenter&catid=35:technical-note-category&Itemid=76