Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-19-2010, 04:07 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Location: Pietravairano - Italy
Age: 16
Posts: 7
Matthew96 is on a distinguished road
Send a message via Skype™ to Matthew96
Arrow How to customize UITableViewCell from Xcode

Hi all,
this is my first post on this forum but I follow it from time...
I've have this problem: I'd like to create and customize an UITableViewCell from Xcode, directly with code, without using Interface Builder...
I'd like to create a cell that conteins 2 UIImage View and 3 UILabel of which two aligned...

I'm using the normal code for cellForRowAtIndexPath, generated from Xcode...

I tried this code:
Code:
cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellBg.png"]];
but without any result...

Can anyone help me?
Thanks
Matthew96 is offline   Reply With Quote
Old 07-19-2010, 04:18 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,896
harrytheshark is on a distinguished road
Default

Try
Code:
cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellBg.png"]];
harrytheshark is offline   Reply With Quote
Old 07-19-2010, 04:51 PM   #3 (permalink)
Registered Member
 
Join Date: Nov 2009
Location: Pietravairano - Italy
Age: 16
Posts: 7
Matthew96 is on a distinguished road
Send a message via Skype™ to Matthew96
Default

Quote:
Originally Posted by harrytheshark View Post
Try
Code:
cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellBg.png"]];
Nothing, I've tried but where the textLabel is, remains white and then I have added this code:
Code:
cell.textLabel.backgroundColor = [UIColor clearColor];
In this mode the code works...
Now, watching my table (droplr.com/1ozW4T), there is a mistake...
How can I change the background color of the rest of the table? I'd like to remove the white and then put the same background of the cells... Is it possible?
Thanks

Last edited by Matthew96; 07-20-2010 at 09:38 AM.
Matthew96 is offline   Reply With Quote
Reply

Bookmarks

Tags
background, cell, customize, iphone, label

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 327
14 members and 313 guests
akphyo, alexP, appservice, bignoggins, EXOPTENDAELAX, flamingliquid, guusleijsten, Hamad, mariano_donati, ohmniac, Paul Slocum, Rudy, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,653
Threads: 94,115
Posts: 402,888
Top Poster: BrianSlick (7,990)
Welcome to our newest member, ohmniac
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:42 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0