Declaring CustomViewController?
- by fuzzygoat
I have noticed in some of my older apps that in situations where I have added a custom View Controller I have not changed the View Controller class in the application delegate. For example, below I have created a CustomViewController class but have declared viewController as UIViewController.
@interface ApplicationAppDelegate: NSObject <UIApplicationDelegate> {
UIWindow *window;
UIViewController *viewController;
}
My question is, both work, but for correctness should I be writing this as follows:
@class CustomViewController;
@interface ApplicationAppDelegate: NSObject <UIApplicationDelegate> {
UIWindow *window;
CustomViewController *viewController;
}
gary