2011-11-03 17 views
0

我有一個ListView選擇的問題。ListView選擇和TextField BackGroundColor

我已經在ListView上繪製TextField以允許編輯數量但是從iOS5升級(當選中行時)即使我指定了紅色(或其他顏色)背景,也可以使用藍色背景進行TextField結果。

有沒有辦法解決它或是一個iOS5的錯誤/問題?

在此先感謝

現在,我可以添加截圖] enter image description here

回答

0

我已經(使用UIListViewDelegate)列表視圖中選擇管理setBackGroundColor解決。

- (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]]; 
    } 
}