如何更改模态呈现的 ViewController 以减少呈现,就像在图像上一样?

问题描述 投票:0回答:0

This is how it should be

How it is by default

我试过在这个vc的viewdidload中改变框架

`

override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
           let height = view.frame.height
           let width = view.frame.width
           let yOffset: CGFloat = +100.0 // Move down by 100 points
           let newFrame = CGRect(x: 0, y: yOffset, width: width, height: height)
           view.frame = newFrame
    }

`

swift xcode uikit storyboard
© www.soinside.com 2019 - 2024. All rights reserved.