When I have nested multi-view, there are sub-view events of their own to deal with this incident, we must go in ViewController achieved? If there are many such incidents are written viewController in, is not it look messy, Note: My project is implemented in pure code, no xib, phase allows the code from the use of higher, more nested between them little as possible, seeking suggestions, thank you!
Reply:
You can also use delegate delegate deal
Reply:
You can see
statement in UIViewUIViewController * _viewDelegate;
In fact, that is a View of UIViewController agent, can also be seen in XIB View has a delegate's Outlet can be set, which means you can specify your own delegate pointing to another instance in code or IB for your View, then View the life cycle events will enable delegates to look elsewhere.
This behavior is the same and UIViewController.
No comments:
Post a Comment