Tengo una barra de herramientas y me gustaría colocarla sobre el teclado.Agregar una barra de herramientas en la parte superior de la uikeyboard
En la notificación keyboardwillshow, He intentado añadir barra de herramientas para el teclado, pero sin suerte, no puedo añadir
por favor hágamelo saber
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];
}
}
¿Qué intenta? –
has probado algo? – Sarah