【问题标题】:Why doesn't my view controller fill the whole screen? [duplicate]为什么我的视图控制器没有填满整个屏幕? [复制]
【发布时间】:2020-03-25 20:46:16
【问题描述】:

大家好,我是 Xcode 的新手。每当我添加一个 ViewController 并从前一个屏幕对其执行 segue 时,它​​看起来像这样。

Pic of ViewController

我希望它看起来是全屏的,而不是让它上下滑动。

This is the View its connected to

这是代码。

if loginMode{
Auth.auth().signIn(withEmail: email, password: password) { (result, error) in
             if error == nil {
                 self.performSegue(withIdentifier: "authSuccess", sender: nil)
             } else {
                 //print(error)
             }
         }

}

【问题讨论】:

    标签: ios swift xcode


    【解决方案1】:

    iOS 13 更改动画

    试试这个

      let VC1 = self.storyboard!.instantiateViewController(withIdentifier: "example")
      VC1.modalPresentationStyle = .fullScreen
      self.navigationController!.present(VC1, animated: true, completion: nil)
    

    【讨论】:

      【解决方案2】:

      当你展示它时这样做

      YOUR_VIEW_CONTROLLER.modalPresentationStyle = .fullScreen
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多