我试图找出设置窗口边界的位置。当前视图不会填满整个屏幕。
我刚刚开始了解 iOS 的 UI 设计。我没有在应用程序委托中设置 rootViewController,也没有实例化嵌入我的视图的导航控制器。
我已经尝试在 appDelegate 的 didFinishLaunching 方法中使用下面的代码。
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
self.rootVC= [[LaunchViewController alloc] init];
self.window.rootViewController = self.rootVC;
[self.window makeKeyAndVisible];
return YES;
有人可以帮助我理解为什么这显示了我的观点。如果我删除添加的编码并只保留返回是,我的视图会加载,但就像我发布的图片一样。
编辑:
我需要标签和表格视图扩展到整个屏幕,而不仅仅是在左上角。我不知道为什么它会像这样加载而不是整个屏幕..请帮助