![enter image description here][1]keyboard get out of screen at bottom little bit when i try to add window as subview having view inside it. How to fix it? Here is my code.
keyboardWindowFrame = nil;
keyboardWindowFrame = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
for(UIView* potentialKeyboard in keyboardWindowFrame.subviews)
{ // if the real keyboard-view is found, remember it.
if([[potentialKeyboard description] hasPrefix:@"<UIPeripheralHost"] == YES)
{
NSLog(@"Keyboard Frame: %@",NSStringFromCGRect(potentialKeyboard.frame));
keyboard = potentialKeyboard;
[keyboard addSubview:viewForGlobeEmoji];
[self.view addSubview:keyboard];
}
}
Here is attached screen shot:
now there is space between toolbar and keyboard after adding
if([[potentialKeyboard description] hasPrefix:@"<UIPeripheralHost"] == YES)
{
NSLog(@"potentialKeyboard: %@",NSStringFromCGRect(potentialKeyboard.frame));
keyboard = potentialKeyboard;
CGRect frame = keyboard.frame;
frame.origin.y = 332;
keyboard.frame = frame;
[keyboard addSubview:viewForGlobeEmoji];
[self.view addSubview:keyboard];
}