簡體   English   中英

iOS 從模態轉為非模態

[英]iOS segue from modal to non-modal

我使用電子郵件模態登錄,然后我想以非模態方式轉到主屏幕。

目前該流程有效,但以模態方式呈現主屏幕。 我將如何正常呈現?

成功登錄后從模態屏幕:

                let storyboard = UIStoryboard(name: "Main", bundle: nil)
                let vc = storyboard.instantiateViewController(identifier: "tabBarController")

//                self.present(vc, animated: true) //works but modally
                  self.show(vc, sender: self)  //works but modally

你可以這樣做:

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(identifier: "tabBarController")
vc.modalPresentationStyle = .overFullScreen
vc.modalTransitionStyle = .crossDissolve
self.show(vc, sender: self) 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM