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 06-17-2008, 05:32 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 53
turinreza is an unknown quantity at this point
Default uitableviewcell.. make text transparent?

hiya
i was wondering if the text property can have a backgroudn that is transparent..
i set an image as a background to the cell but when it has text in it
the text has a white background..

anyway to set it to transparent?
TIA
turinreza is offline   Reply With Quote
Old 09-16-2008, 03:16 PM   #2 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 6
blackspiderman is on a distinguished road
Default

Here an example:

[label setBackgroundColor:[UIColor clearColor]];
blackspiderman is offline   Reply With Quote
Old 09-09-2009, 07:01 AM   #3 (permalink)
Registered Member
 
gblank's Avatar
 
Join Date: Oct 2008
Location: Netherlands
Posts: 35
gblank is on a distinguished road
Send a message via Skype™ to gblank
Default

Quote:
Originally Posted by turinreza View Post
hiya
i was wondering if the text property can have a backgroudn that is transparent..
i set an image as a background to the cell but when it has text in it
the text has a white background..

anyway to set it to transparent?
TIA
Hi
did you managed to solve this problem?
I'm having the same issue, I have an image that i set as a backgroundview of a cell, but when I have text in it it covers the image with white background.

Thanks
gblank is offline   Reply With Quote
Old 09-09-2009, 08:22 AM   #4 (permalink)
Registered Member
 
gblank's Avatar
 
Join Date: Oct 2008
Location: Netherlands
Posts: 35
gblank is on a distinguished road
Send a message via Skype™ to gblank
Default

Quote:
Originally Posted by gblank View Post
Hi
did you managed to solve this problem?
I'm having the same issue, I have an image that i set as a backgroundview of a cell, but when I have text in it it covers the image with white background.

Thanks
Solution:

Surfing the forums I found one solution that works for me and I’d like to share. In my case I was re-writting the UItableViewCell definition to build my own “Custom UITableViewCell” ’cause I need to display the information I had in an specific way, if this is your case too, you can override the layoutSubviews method to this one:

- (void)layoutSubviews {
[super layoutSubviews];
[self setBackgroundColor:[UIColor clearColor]];
}
gblank is offline   Reply With Quote
Old 09-09-2009, 10:55 AM   #5 (permalink)
poor little lamb
 
Join Date: Sep 2009
Posts: 9
tadelv is on a distinguished road
Default

perhaps, it would be better to set the cells background color at the initialization (the initWithFrame:reuseIdentifier: method)?

if you want to set the labels background to transparent its just like blackspiderman said:
Code:
myLabel.backgroundColor = [UIColor clearColor];
tadelv is offline   Reply With Quote
Old 09-09-2009, 11:35 AM   #6 (permalink)
Humbled Student
 
Dutch's Avatar
 
Join Date: Apr 2009
Location: Long Island, NY
Age: 32
Posts: 883
Dutch will become famous soon enough
Send a message via AIM to Dutch
Default

Quote:
Originally Posted by gblank View Post
- (void)layoutSubviews {
[super layoutSubviews];
[self setBackgroundColor:[UIColor clearColor]];
}
Be careful as using this function makes any Editing views in that cell (delete button, etc...) stop working.
Dutch is offline   Reply With Quote
Old 09-09-2009, 12:01 PM   #7 (permalink)
Registered Member
 
gblank's Avatar
 
Join Date: Oct 2008
Location: Netherlands
Posts: 35
gblank is on a distinguished road
Send a message via Skype™ to gblank
Default

Quote:
Originally Posted by Dutch View Post
Be careful as using this function makes any Editing views in that cell (delete button, etc...) stop working.
I would appreciate another solution to this problem, so far anything that I tried didn't work.
I am working on the SMS type bubble chat messages and I draw an image as the cell background but when I put text in this cell it covers the bubble and I only see left and right small sides of the bubble.
gblank is offline   Reply With Quote
Old 09-09-2009, 12:17 PM   #8 (permalink)
Humbled Student
 
Dutch's Avatar
 
Join Date: Apr 2009
Location: Long Island, NY
Age: 32
Posts: 883
Dutch will become famous soon enough
Send a message via AIM to Dutch
Default

I've experienced the same thing as you....I actually have a previous thread on it... Here is the link
Dutch is offline   Reply With Quote
Reply

Bookmarks

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Wrap Text in UITableViewCell ? satyanarayanagv iPhone SDK Development 7 12-16-2009 05:05 AM
Did you guys make the deadline? BeyondtheTech iPhone SDK Development 4 07-09-2008 09:34 PM
What in a XIB would make my app switch to portrait? bronxbomber92 iPhone SDK Development 0 06-21-2008 12:59 PM
Adding button and text field in uitableviewcell sasikantpradeep iPhone SDK Development 1 06-06-2008 07:55 AM
ImageView inside a partial-transparent view javid.alimohideen iPhone SDK Development 2 04-22-2008 01:38 PM


» Advertisements
» Online Users: 335
3 members and 332 guests
guusleijsten, Kryckter, LEARN2MAKE
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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