简体   繁体   English

在iOS应用中将视图添加到UIWindow时,视图控制器是什么?

[英]What is view controller when a view is added to UIWindow in an iOS app?

When I add a view to UIWindow by addSubView, What is ViewController for the subview that set to rootViewController of UIWindow? 当我通过addSubView将视图添加到UIWindow时,设置为UIWindow的rootViewController的子视图的ViewController是什么?

What I am confused is that I don't create a ViewController for the subview explicitly and set its view property to my own view. 我感到困惑的是,我没有为子视图显式创建一个ViewController并将其view属性设置为我自己的视图。

在这种情况下,视图不属于视图控制器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS扩展UIWindow禁用了根视图控制器? - iOS Extending UIWindow disabled the root view controller? 第二次添加时,视图在UIWindow上不可见 - View not visible on UIWindow when added for the second time 在添加到UIWindow的视图上使用autolayout - Use autolayout on view added to UIWindow 在不同的UIWindow上显示视图控制器 - Present a view controller on different UIWindow 向UIWindow上添加的视图添加手势识别器 - Adding a gesture recogniser to a view which added on UIWindow 我应该将底页作为子视图添加到当前视图控制器,还是应该在添加了SubView的情况下推送UIWindow? - Should I add bottom sheet as a subview to current view controller or push a UIWindow with the subView added? Swift iOS - 当作为子视图控制器添加到另一个视图控制器时,是否应该在子视图控制器中调用 Deinit? - Swift iOS -Should Deinit get called inside child View Controller when added as a child to another View Controller? Swift 3 - 在另一个视图控制器的 UIWindow 上 addChildViewController - Swift 3 - addChildViewController on UIWindow of another view controller 在uiwindow子视图之上显示视图控制器 - presenting view controller on top of uiwindow subviews 在 UIWindow 上交换 rootViewController 不会释放视图控制器 - Swapping rootViewController on UIWindow does not deallocate view controller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM