开发者

UISplitViewController in Mac apps?

开发者 https://www.devze.com 2023-02-06 10:09 出处:网络
Is it possible to use UISplitViewCo开发者_Go百科ntroller in a Mac app?No, it\'s part of UIKit and thus not available on Mac. You can use NSSplitView if you need a view with multiple panes, but it has

Is it possible to use UISplitViewCo开发者_Go百科ntroller in a Mac app?


No, it's part of UIKit and thus not available on Mac. You can use NSSplitView if you need a view with multiple panes, but it has a very different API.

Besides, the most significant feature of UISplitViewController (handling auto-rotation and hiding the master view in portrait mode) doesn't make much sense in a Mac app, as the screen never rotates.


If you're motivated to write your own, MGSplitViewController is a BSD-licensed general reimplementation of UISplitViewController for UIKit that might provide insight. Project available at MGSplitViewController on Github.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号