2011-11-03 2 views
0

J'ai un problème avec la sélection ListView. J'ai un TextField dessiné sur ListView pour permettre d'éditer la quantité Mais à partir de la mise à niveau iOS5 (quand la ligne est sélectionnée) TextField obtient un fond bleu même si je spécifie un arrière-plan rouge (ou autre couleur).ListView Selection et TextField BackGroundColor

Existe-t-il un moyen de le résoudre ou est-ce un bogue/problème iOS5?

Merci à l'avance

Maintenant, je peux ajouter Instantané ... enter image description here

Répondre

0

Je l'ai résolu en gérant setBackgroundColor lors de la sélection listview (en utilisant UIListViewDelegate).

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    //Se ho la gestione del presa ordine su articoli valorizzo la quantità 
    if (Config.PresaOrdineSuArticoli == 1 && ![Testata.Spediti isEqualToString:@"S"]){ 
     //Posso provare ad accedere al controllo e cambiare il background durante la selezione 
     [(UITextField *) [[ListaArticoli cellForRowAtIndexPath:indexPath] viewWithTag:-4] setBackgroundColor:[UIColor whiteColor]]; 
    } 
}