开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜