I have an ImageView on a UIView. I'm trying to move view keyboard size but all content move properly instead of UIImageView.
-(void) keyboardWillShow:(NSNotification *) notification {
NSDictionary* keyboardInfo = [notification userInfo];
// Work out where the keyboard will be
NSValue* keyboardFrameBegin = [keyboardInfo valueForKey:UIKeyboardFrameBeginUserInfoKey];
CGRect keyboardFrameBeginRect = [keyboardFrameBegin CGRectValue];
// Work out animation duration
NSTimeInterval animationDuration =[[keyboardInfo valueForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
UIViewAnimationOptions keyboardAnimationCurve = [[keyboardInfo valueForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue];
// Animate this
[UIView animateWithDuration:animationDuration
delay:0.0
options:keyboardAnimationCurve
animations:^(){
self.view.frame = CGRectOffset(self.view.frame, 0, -keyboardFrameBeginRect.size.height);
}
completion:NULL];
[UIImageView animateWithDuration:animationDuration
delay:0.0
options:keyboardAnimationCurve
animations:^(){
self.imgBankLogo.frame = CGRectOffset(self.imgBankLogo.frame, 0, -keyboardFrameBeginRect.size.height);
}
completion:NULL];
}
Anyone had same issue or some suggestion? I even tried to move UIImage but it is not moving.
As you can see everything moved except imageview!