私のAppDelegate.h
には、@property (nonatomic, strong) IBOutlet UIWindow *window
と@property (nonatomic, strong) IBOutlet UITabBarController *tabBarController
があります。MainWindowアウトレットが接続されていても、window、tabBarControllerログのIBOutletプロパティ(null)
実装では、I @synthesize *window = _window, *tabBarController = _tabBarController;
です。
ターゲット設定では、私のMainWindow.xib
ファイルが指定されています。
私のMainWindow.xib
ファイルには、AppDelegate
,Window
、およびTab Bar Controller
という3つのオブジェクトがあります。私はWindow
をAppDelegate
に、Tab Bar Controller
をWindow.rootViewController
に、Tab Bar Controller
をAppDelegate
に接続します。
AppDelegate.h
に戻ると、アウトレットの円は接続されているように見えます。
は最後に、私のAppDelegate.m
ファイルに:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self.window makeKeyAndVisible];
NSLog(@"%@",self.window);
return YES;
}
このログの内容は常に(null)
です。
アプリケーションの起動時に、ウィンドウとタブバーのコントローラーが表示され、ユーザーとの対話が表示されます。
何が問題になりますか?