簡體   English   中英

Swift 3:讓按鈕呈現在ViewController中,怎么辦?

[英]Swift 3: make button present ViewController, how?

我希望我的按鈕可以在登機屏幕上向用戶顯示我的按鈕,因為它包含一些對我的應用程序的重要說明。 我第一次顯示入職屏幕是在第一次啟動后; 我當前的函數如下所示:

@IBAction func anleitung(sender: RoundButtons) {

    let appDelegate = AppDelegate()
    appDelegate.window?.rootViewController?.present(OnboardingScreen(), animated: true, completion: nil)

}

實際上,這就像我嘗試此操作的第四種方法,但是顯然,它們都不起作用。 你知道怎么做嗎?

感謝您的光臨! 祝你有美好的一天!

@IBAction func anleitung(sender: RoundButtons) {
    let appDelegate = UIApplication.shared.delegate as! AppDelegate
    appDelegate.window?.rootViewController?.present(OnboardingScreen(), animated: true, completion: nil)
}

暫無
暫無

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

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