Hi,
I registerd for the keyboard show event, and implemented the method like this :
-(void) KeyboardDidShow:(NSNotification*)notif{
if (KeyboardVisible)
{
NSLog(@"Keyboard is already visible");
return;
}
NSDictionary* info = [notif userInfo];
NSValue* value = [info objectForKey:UIKeyboardBoundsUserInfoKey];
CGSize keyboardSize = [value CGRectValue].size;
CGRect ViewFrame = self.view.frame;
ViewFrame.size.height-=keyboardSize.height;
scrollView.frame = ViewFrame;
KeyboardVisible = YES;
}
Within my view I have 2 textViews. The problem I have is : When I put the cursor within the textView and the keyboard pops, If I play with the view cursor up and down all text is getting smeared and it looks like the 2 textviews mix. Is there something wrong with this code ? (It is actually taken from a book i'm reading). Worth mentioning is that initially the view was implemented without scrolling, and then scrolling abilities were added using the "Embed objects in Scroll View" command.