取得當前 ViewController

1 篇文章 / 0 new
author
取得當前 ViewController
let appDelegate  = UIApplication.shared.delegate as! AppDelegate
let viewController = appDelegate.window!.rootViewController as! mainViewController; //取得當前 ViewController
Free Web Hosting