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.
我想获得视图框架。这是由这一行完成的:
self.view.frame
但是当我在 iPad 中执行此操作时,它等于整个视图。但我只想要拆分视图的主要部分。
拆分视图中主视图控制器的框架可以访问为
UIViewController* master = splitViewController.viewControllers[0]; CGRect frame = master.view.frame;