tabbarController上面的presentViewController

时间:2018-05-15 17:18:28

标签: ios swift

let storyboard = UIStoryboard(name: "Main", bundle: nil)

let VC1 = storyboard.instantiateViewController(withIdentifier: "MyControlerVC") as! MyControlerVC

self.definesPresentationContext = true
VC1.modalPresentationStyle = .overCurrentContext

self.present(VC1, animated: true, completion: nil)
// self.tabbarcontroller.present(VC1, animated: true, completion: nil)

我正在尝试将上面的代码显示在上面的Tabbar但我显示此错误。请不要回复使用pushviewontroller。我需要tabar show

     ---> tabbarcontroller -> Cilck tababritem 
            --> UIViewcontroller --> Button Click --> Presnt aboveviewcontroller

 NSInvalidArgumentException', reason: 'Application tried to present modally an active controller

0 个答案:

没有答案