I currently have a simple iPhone app that loads a custom subclass of UIView. At the moment, there is only one controller for the entire application, although there are several UIViews for the logical separation of the program.
My current structure looks something like this:
mainView : UIScrollView \__ has one subView : myCustomUIView : UIView \__ has many subSubView : myOtherCustomUIView : UIView
Hope this is clear. the colon, of course, represents inheritance.
My problem is this: I need to intercept events at the lowest level of subSubView. Maybe I can do this in the application controller if I need it, but should I have a subSubViewController? Should I have a subViewController too?
If so, can someone point me to some links for this manually? I can, of course, create classes, but connecting them to user views seems nontrivial. I do not use the interface constructor at all, except for the main one, which contains the window object.
My main confusion arises from what happens when I have a view nested in a view with another controller. So let's say I had a subSubViewController, but the mainView still has its mainViewController. Since subSubView is contained in mainView, will this not cause any problem?
And should I use delegates at all for any of this?
Any push in the right direction would be appreciated.
iphone cocoa-touch uiviewcontroller uiview
Evan cordell
source share