For the constant UIKeyboardFrameEndUserInfoKey
, in the Apple docs it says:
These coordinates do not take into account any rotation factors applied to the window’s contents as a result of interface orientation changes. Thus, you may need to convert the rectangle to window coordinates (using the convertRect:fromWindow: method) or to view coordinates (using the convertRect:fromView: method) before using it.
So if I use [view1 convertRect:rect fromView:view2]
What would I insert for the above parameters to get it to convert the rotation values correctly? ie:
view1 = ? rect = ? (the keyboard frame I'm assuming) view2 = ?
Been trying some things and getting some funny stuff.
convertRect
as well, but the code below is cleaner, IMO. – ConflictconvertRect
is because it only really works well inside a view controller where you have amyView
which represents the topmost view. If however, you are listening for notifications from within aUITextField
subclass, the transformation using self isn't particularly helpful. – Conflict