UIWindow convertRect: fromView:
Can someone tell me how this works on iPad? Is it different from how it works on iPhone?
CGRect textFieldRect = [self.view.window convertRect:textField.bounds fromView:textField];
It get weird heights fr开发者_JAVA百科om textFieldRect.size.height. All seems normal until about the middle of the view. The size.height shrinks to a very low number, and bounces back and forth as my cursor goes down the view.
There's some good explanations in here:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/38908-can-someone-please-explain-how-convertrect-fromview-method.html
If you were to colour the view for debugging purposes and then compare what it is currently doing versus what you want/expect, I think this will help you.
精彩评论