获得window最上层视图
2015-12-02 本文已影响69人
方克己
//获取最上层view
var topView:UIView = UIView()
let views:Array = UIApplication.sharedApplication().windows
topView = views.first! as UIView
//获取最上层view
var topView:UIView = UIView()
let views:Array = UIApplication.sharedApplication().windows
topView = views.first! as UIView