Ios Swift-使用自定义视图控制器

Ios Swift-使用自定义视图控制器,ios,iphone,swift,cocoapods,Ios,Iphone,Swift,Cocoapods,呜呼!我的第一个堆栈溢出帖子:) 在Swift中使用自定义视图控制器时,我遇到了一些问题 我正在使用此处找到的PopupDialog API: 此代码工作正常,弹出窗口显示为: let title = "THIS IS THE DIALOG TITLE" let message = "This is the message section of the popup dialog default view" // Create the dialog let popu

呜呼!我的第一个堆栈溢出帖子:)

在Swift中使用自定义视图控制器时,我遇到了一些问题

我正在使用此处找到的PopupDialog API:

此代码工作正常,弹出窗口显示为:

    let title = "THIS IS THE DIALOG TITLE"
    let message = "This is the message section of the popup dialog default view"
    // Create the dialog
    let popup = PopupDialog(title: title, message: message, image: nil)
    self.present(popup, animated: true, completion: nil)`
但当我尝试像这样使用自己的视图控制器时:

let ratingVC = popupViewController(nibName: "popupViewController", bundle: nil)
let popup = PopupDialog(viewController: ratingVC, buttonAlignment: .horizontal, transitionStyle: .bounceDown, gestureDismissal: true)
present(popup, animated: true, completion: nil)
程序将编译并运行,但弹出窗口不再像以前那样显示。我面临着一个黑暗的屏幕变暗,以准备弹出窗口,但因此,视图控制器没有出现


此外,任何好的Swift资源都将不胜感激,我到目前为止的学习都是通过网络浏览。谢谢大家!

你在用
评级VC
做什么?您必须首先显示它,然后使用它来显示
弹出窗口
分级VC
是我想在弹出窗口中显示的viewcontroller u seen分级VC,返回VC或notAS您需要一些有用的资源请签出这一点您用
分级VC
做什么?您必须先显示它,然后使用它来显示
弹出窗口
分级VC
是我想在弹出窗口中显示的viewcontroller,返回VC或notAS您需要一些有用的资源请签出此