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.
精彩评论