尝试在iPad上创建一个全屏显示的Swift游乐场。我尝试使用UIScreen.main().bounds
获取屏幕边界,但显示对于默认的游乐场框架来说太大了。我知道这是可能的,因为所有示例游乐场都是全屏的。我只是无法弄清楚它是如何完成的。
更新1: Here is a photo. I want the white frame to take up the entire screen.
答案 0 :(得分:4)
每个“.playgroundpage”文件夹都有一个Manifest.plist文件(如果没有,请创建一个)。将LiveViewEdgeToEdge
添加为BOOL
到Manifest.plist,并将值设置为YES