我正在学习如何使用目标c在SQLite中使用iOS。我提到了本教程,在名为“AppDelegate-SqliteDataAppDelegate.h”的章节中,作者编写了以下代码:
作者代码
#import <UIKit/UIKit.h>
#import "DisplayViewController.h"
@interface SqliteDataAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UINavigationController
*navigationController;
@property (strong, nonatomic) DisplayViewController
*displayViewController;
@end实际上,在故事板中,我添加了一个ViewController,并嵌入了一个NavigationController,如下图1所示。
图像-1

但我尝试将ctrl+drag的NavigationController和ViewController都放到SqliteDataAppDelegate.h文件中,但这是不可能的。
请告诉我如何将ViewController和UINavigationController添加到SqliteDataAppDelegate.h文件中,UIWindow是什么?
发布于 2017-06-13 09:49:16
这不可能。不能将ViewController的子视图连接为出口。查看示例代码,在属性之前没有IBOutlet,所以我假设它们是由代码创建的。
https://stackoverflow.com/questions/44517620
复制相似问题