开发者

How to get a reference to the current window?

Need a ref to the window in which a view is inside (no matter how deep inside). Usually there is only one window in an iPhone app. How would I access that the most easy wa开发者_运维百科y? Is there something cooler than getting the app delegate to access the window?


To get a currently used window by your application use:

[[UIApplication sharedApplication] keyWindow]


Well, UIView has the window property...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜