What's new

Moving multiple views together with UIKeyboardWillShowNotification

MikaelBoisvert

New Member
Joined
Dec 21, 2011
Messages
1
Reaction score
0
Hi,

I'm quite new to xcode and I have a visual problem. I have a phonegap html page with a mapkit view above in the middle. I thought that inputing text with the little keyboard layout would have its bounce animation move every UIView upwards, but it only moves the phonegap view, so the map remains in the center (which creates a gap in the background).

So in other words, I'd like to be able to have both my phonegap web view and mapkit view to move together, when the keyboard display appears.

I tried playing with UIKeyboardWillShowNotification to handle the translations myself:
-Add a translation animation on the map kit view in a new UIKeyboardWillShowNotification instance -> but it doesn't move in synch with the web view's one.
-First removing all associations to UIKeyboardWillShowNotification in the app, and then creating a new UIKeyboardWillShowNotification event where I'd apply a translation directly on the controller's main window, so all subview move together. -> However calls to removeObserver don't seem to work? Or I'm not calling it correctly?

Maybe I'm doing something wrong? Within xCode 4.0.
 
Top