|
|
|
|
|
|
CGFloat bottom = CGRectGetHeight([[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]); |
|
|
|
CGFloat scale = [UIScreen mainScreen].scale; |
|
|
|
|
|
|
|
// scale == 3 => screen is 1242 * 2208 => we have to perform down-sampling to obtain the real length |
|
|
|
// 0.8696 = 1920 / 2208, the vertical down-sampling ratio |
|
|
|
if (scale == 3) { |
|
|
|
bottom = bottom * 0.8696; |
|
|
|
} |
|
|
|
|
|
|
|
viewInsets.bottom = bottom * scale; |
|
|
|
padding.bottom = 0; |
|
|
|
|
|
|
|