my project code built (cmnd + b) in xcode 5.1.1 run (cmnd + r) with simulator iphone 5 ios 7.1 produce the following
same code built (cmnd + b) in xcode 6.1.1 run (cmnd + r) with simulator iphone 5 ios 7.1 produce the following
- running in xcode 6.1.1 with simulator iphone 5 ios 8.1 looks fine (like the first image from xcode 5.1.1)
any ideas?
this is the code for showing the keyboard:
- (void)showKeyboard:(NSNotification*)notification
{
NSValue *keyboardEndFrameValue = [[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey];
CGRect keyboardEndFrame = [keyboardEndFrameValue CGRectValue];
NSNumber *animationDurationNumber = [[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey];
NSTimeInterval animationDuration = [animationDurationNumber doubleValue];
NSNumber *animationCurveNumber = [[notification userInfo] objectForKey:UIKeyboardAnimationCurveUserInfoKey];
UIViewAnimationCurve animationCurve = [animationCurveNumber intValue];
UIViewAnimationOptions animationOptions = animationCurve << 16;
int searchBarYPadding = 60;
if ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0f)
{
searchBarYPadding = 42;
}
[UIView animateWithDuration:animationDuration
delay:0.0
options:animationOptions
animations:^{
CGRect textFieldFrame = self.addressSearchBar.frame;
textFieldFrame.origin.y = keyboardEndFrame.origin.y - searchBarYPadding;
self.addressSearchBar.frame = textFieldFrame;
}
completion:^(BOOL finished) {isKeyboardDisplayed = YES;}];
}