I am new to Objective-C and iPhone development.
I have a collection class implementing common UI functionality, eg. an EditBox for typing a formula, a label where the result is rendered, and, a button for executing the calculation.
I want to be able to embed this functionality in various projects.
I don’t want to generate the UI apriorialy, rather, I want to define a class with IBOutlet and IBAction elements, and, to be able to directly link them with whatever UI is implemented by the application (Using the Interface Builder).
Will IBAction/IBOutlet be accessible in the Interface Builder although they were implemented on a class different than the ViewController ?
Is this use-case possible with ‘Objective-C’ ?
Any help will be appreciated.
yes. you can instantiate every class in interface builder and then use that
e.g.
a Calculator class
=> drag a NSObject from the palette/library into the left pane of IB and change its class in the inspector to Calculator 🙂 then you can use that