I’ve enabled ARC, In my didFinishLaunchingWithOptions method, I wrote the following code:
AppDelegate.h:
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
AppDelegate.m:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
ViewController * vc = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:vc];
self.viewController = nav;
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
But the statement: self.viewController = nav; gets a compile warning, the warning info is:
file://.../AppDelegate.m: warning: Semantic Issue: Incompatible pointer types passing 'UINavigationController *__strong' to parameter of type 'ViewController *'

How to remove the warning?
Thanks.
I assume that ViewController is a custom subclass of UIViewController which is either completely different or a subclass of UINavigationController itself. That’s why it’s wrong: a superclass can’t completely act as it’s subclass(es) (e. g., it may not have certain properties/methods etc.), hence the warning.