Ho una barra degli strumenti e vorrei posizionarla sulla parte superiore della tastiera.Aggiunta di una barra degli strumenti sulla tastiera superiore
Nella notifica keyboardwillshow, ho provato ad aggiungere barra degli strumenti per la tastiera, ma senza fortuna, non posso aggiungo
prega fatemi sapere
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];
}
}
Cosa hai provato? –
hai provato qualcosa? – Sarah