我直接执行this tutorial直到分钟8:35,它不起作用。SWRevealViewController不工作
import Foundation
class ViewController: UIViewController {
@IBOutlet weak var Open: UIBarButtonItem!
override func viewDidLoad() {
super.viewDidLoad()
print("open")
Open.target = self.revealViewController()
Open.action = Selector("revealToggle:")
print("open2")
}
override func viewDidAppear(_ animated: Bool) {
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}}
但是,它的值得注意。我得到这个页面闪屏page.And以下后我怎么做
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "Navigate") as! UINavigationController
//self.present(vc, animated: true, completion: nil)
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.window?.rootViewController = vc
从Splashscontroller我打电话去main.storyboard。 导航,我点击导航控制器,并给它storyboardid导航。
我打开页面,打开按钮..但没有权利揭示控制器打开时,我点击它。
我试图instantiateViewController(withidentifier:“SWRevealViewController”越来越黑屏 –