У меня есть панель инструментов, и я бы хотел разместить ее поверх клавиатуры.Добавление панели инструментов поверх uikeyboard
В уведомлении keyboardwillshow, я пытался добавить панель инструментов на клавиатуре, но не повезло, я не могу добавить
Пожалуйста, дайте мне знать,
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
UIView* keyboard;
for(int i = 0; i < [tempWindow.subviews count]; i++)
{
//Get a reference of the current view
keyboard = [tempWindow.subviews objectAtIndex:i];
//Check to see if the description of the view we have referenced is "UIKeyboard" if so then we found
//the keyboard view that we were looking for
if([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES)
{
[keyboard addSubview:myToolbar];
}
}
Что вы пробовали? –
вы что-то пробовали? – Sarah