I've been looking at the API for IOS Programming, and have been reading about view controllers and UIViews. It looks like UIViewController subclasses are really useful for Modal navigation and custom animation, but I can't see any other uses than that.
What is the benefit to using a UIViewController subclasses rather than a normal NSObject subclass?
Why
@interface MyViewController : UIViewController {
}
-(void)handleEvent;
@end
Instead of just
@interface MyViewController : NSObject {
UIView* view;
}
@property(retain) UIView* view;
-(void)handleEvent;
@end
Don't you just end up adding just the view to the window, not the actual viewController itself? For most purposes, isnt all of the functionality you need encapsulated within the UIView object? You just end up adding it like this:
[window addSubview:myViewControllerInstance.view]
Is there a use for UIViewController other than built in functionality like Modal Navigation?
Thanks.
(Sorry if this is a stupid question, I've been learning this for 2 days now)