Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当设备旋转发生变化而不必控制视图时,如何以及在何处调用实例- setNeedsLayout的方法?基本上,这可以归结为在没有控制器的情况下通常理解视图生命周期......UIViewUIViewController
- setNeedsLayout
UIView
UIViewController
我猜想UIViewController当用户与视图交互时(例如界面方向更改等)代表视图执行的某些操作可能会通过注册到UIApplicationDidChangeStatusBarOrientationNotificationinUIView来处理。
UIApplicationDidChangeStatusBarOrientationNotification