0

我有一个关于将 XIB 文件加载到 UITabBar 控制器内的操作表的问题。

我想在操作表中显示使用 Google、Facebook 和电子邮件的登录方法。

尝试使用此代码,但按钮和文本的样式未正确显示。你们有任何在 TabController 中向操作表显示 xib 文件或任何自定义视图的示例吗?

let myView = Bundle.main.loadNibNamed("SignInView", owner: nil)![0] as! UIView

@IBAction func showSignIn() {
        let actionSheet = UIAlertController(title: "\n\n\n\n\n\n", message: nil, preferredStyle: .actionSheet)

        actionSheet.view.addSubview(myView)
        present(actionSheet, animated: true, completion: nil)
    }

谢谢!

4

0 回答 0