Culoare UITableViewCell
  [ Ignoră ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Am si eu o intrebare, cum pot sa obtin culoarea alb mat precum cell-ul 1?
Daca folosesc [UIColor whiteColor] obtin culoarea din cell-urile 2,3,4…. dar nu stiu cum pot obtine acel alb mat ca in cell-ul 1, ma poate ajuta cineva? smile

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 1 ]
RankRank
Jr. Member
Din: 
Macuser din: 06.03.09

Nu sunt sigur ce vrei exact, dar incearca [UIColor groupTableViewBackgroundColor]

Profil
 
  [ Ignoră ]   [ # 2 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Vreau sa obtin coloarea alba, dar alb mat cum este primul cell in atasament. [UIcolor whiteColor] nu ofera asta…

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 3 ]
Avatar
RankRankRank
Member
Din: Bucuresti - Baba Novac
Macuser din: 10.05.06

sau asa? : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f]
Dar in mod default, orice tableCell are acea culoare alb mat. TU ai facut implementare custom unde le-ai facut normale “gri” si selectate le vrei albe ??

 Semnătură 

cool smirk  Generally a smart-ass!

Profil
 
  [ Ignoră ]   [ # 4 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Nu e custom,e default dar ala nu pare un alb mat…Vezi imaginea atasata.

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 5 ]
Avatar
RankRankRank
Member
Din: Bucuresti - Baba Novac
Macuser din: 10.05.06

hmmmm, foarte dubios. Ia vezi, nu ai setata vreo transparenta (alpha) < 1.0 pe undeva?

 Semnătură 

cool smirk  Generally a smart-ass!

Profil
 
  [ Ignoră ]   [ # 6 ]
Avatar
RankRankRankRank
Moderator
Din: Cluj-Napoca
Macuser din: 26.01.06

Din ce-mi dau eu seama ai un tabel gri cu o celula alba (si pare custom dupa umbre). Cred ca trebuie sa umbli si la culoarea tabelului.

 Semnătură 

Mcintoshing…

Profil
 
  [ Ignoră ]   [ # 7 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Tocmai ca gri-ul ala e obtinut folosind [UIColor whiteColor] ...
Ce vreau eu e sa obtin alb-ul ala din prima celula.

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 8 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

daca folosesti IB iti recomand sa-ti verifici bine xib-urile. eu nu lucrez decat programatic si ceea ce invoci tu este hilar! smile) mai exact prima celula are culoarea [UIColor whiteColor] iar celelalte au culoarea [UIColor grayColor]. asa, ochiometric! smile) n-am intampinat niciodata probleme de genul asta..

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 9 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

ma tem ca ceea la ce te referi tu nu este cell.backgroundColor ci dimpotriva, incearca sa schimbi yourTableView.backgroundColor

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 10 ]
Avatar
RankRankRank
Member
Din: Ploiesti
Macuser din: 06.12.11

eu am reusit adaugind aceasta linie de cod in viewDidLoad

if ([self.tableView respondsToSelector:@selector(backgroundView)]self.tableView.backgroundView nil

dupa care poti seta orice culoare doresti pentru TableView Background in IB (Storyboard ) sau adaugind linia de cod de mai jos  

[self.tableView setBackgroundColor:[UIColor whiteColor]]
 Semnătură 


MacBook Pro 15”  i7 2.2GHz/ 16GB/ 500GB SSD ,  10.11
MacBook Air 13”  i5 1.3GHz/ 4GB/ 256GB SSD ,  10.11

Profil