iOS subview widget hooked up to multiple controllers
Posted
by
Allison A
on Stack Overflow
See other posts from Stack Overflow
or by Allison A
Published on 2012-12-07T15:44:39Z
Indexed on
2012/12/07
17:06 UTC
Read the original article
Hit count: 204
So, I want to create a reusable widget as a xib and subview that can appear on a set amount of specific screens. This widget will have three buttons, each with an Action.
I want to be able to handle these actions on multiple viewcontrollers.
So say ViewControllerA, ViewControllerD, and ViewControllerF can handle the three button events, each in their own way.
I've created the nib file. How do I import it into the specific viewcontrollers, and then how do I wire up those events?
EDIT: I know that I could potentially get outlets set up via a viewcontroller, but Apple states that UIViewController is for full-screen views only, and my widget is only taking up a small portion of the screen.
© Stack Overflow or respective owner