开发者

how can I get the topmost view at any time in iphone sdk4?

开发者 https://www.devze.com 2023-01-05 02:37 出处:网络
how can I get the topmost view at开发者_如何学C any time in iphone sdk4?it would be helpful if you ask your question a bit more in detail, but anyway you can try it with this line of code:

how can I get the topmost view at开发者_如何学C any time in iphone sdk4?


it would be helpful if you ask your question a bit more in detail, but anyway you can try it with this line of code:

UIView *topMostView = [UIApplication sharedApplication].keyWindow.subviews.firstObject;

cheers, anka


I was looking for answer to another thread here. Problem of returning UIKeyBoard object was because; while it was a UIView in older SDK, it is UIWindow in iphone SDK 4. Problem solved.

0

精彩评论

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