显示一个弹出视图控制器

时间:2020-09-11 13:49:59

标签: ios swift

我正在使用STPopup(https://github.com/kevin0571/STPopup)来显示视图控制器弹出窗口。这是代码

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "OneFreeBookViewController") as! OneFreeBookViewController
        
let popupController = STPopupController(rootViewController: vc)
popupController.present(in: self)
popupController.navigationBar.isHidden = true

很遗憾,弹出窗口没有显示。有人知道我在做什么错吗?

0 个答案:

没有答案