let viewController=storyboard.instantiateViewControllerWithIdentifier("對(duì)應(yīng)要啟動(dòng)的ViewController名字") as 對(duì)應(yīng)要啟動(dòng)的ViewController名字
viewController.view.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
//viewController.view.backgroundColor = UIColor(white: 1, alpha: 0.9)
self.presentViewController(vPersonalizedSettingsViewController, animated: 動(dòng)不動(dòng)畫隨便你, completion: nil)
這里要注意的是橄妆,要啟動(dòng)的viewController必須要在這里設(shè)置半透明爱榔,如果在對(duì)應(yīng)的UIViewController viewDidLoad里面設(shè)置是沒有半透明的虾攻!
然后要啟動(dòng)的UIViewController viewDidLoad的時(shí)候設(shè)置
self.modalPresentationStyle = .Custom