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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

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 05-30-2008, 04:00 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 313
Send a message via AIM to jonc
Default Default TableView section header background color

I have been using the "- (UIView *)tableViewUITableView *)tableView viewForHeaderInSectionNSInteger)section" on a plain styled table because I want the section headers to be 2 lines long but still have them be that semi transparent default color. By default you can only be a one line string, even if you insert the \n character for a new line with the more basic "- (NSString *)tableViewUITableView *)tableView titleForHeaderInSectionNSInteger)section;" method.

Does anyone know what that color color is? It looks like a blueish gray with the alpha adjusted, like the letter headers when looking at Songs under iPod. I was trying to match it exactly, but I am not sure that it will be possible unless any of you have some ideas on how to figure it out. I saw several arrays of section header views in the UITableView class but they are all private and I can't touch them.

I did a lot of searching and couldn't even find anything on google about viewForHeaderInSection so any help would be greatly appreciated. Thanks.
__________________
xCodeForum
jonc is offline   Reply With Quote
Old 05-30-2008, 06:39 PM   #2 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 802
Default Re: Default TableView section header background color

Color - If you are on a device make a snapshot in xcode organizer and read that in any graphics program. If on simulator then snapshot the simulator and take that into a graphics program.
Desktop stuff there's also pixie utility app in xcode apps.
scottiphone is offline   Reply With Quote
Old 05-30-2008, 08:17 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 313
Send a message via AIM to jonc
Default Re: Default TableView section header background color

It wasn't a solid color, it looks slightly rounded at the edges. I changed the width of the default section title so it would fit 2 lines and put no text in it. I took a screenshot and cut out that part of the table. I create a UIColor with the image and turn down the alpha a bit. I then apply it as the background of the lbabel I return, it looks like the real thing.
__________________
xCodeForum
jonc is offline   Reply With Quote
Old 08-06-2008, 09:43 PM   #4 (permalink)
Registered Member
 
Join Date: Jul 2008
Posts: 33
Default

I am using a UIImageView for viewForHeaderInSection, it came out with the image resized to the rect of the header, I tried to set tableview.autoResizeSubviews = NO, it did not work. I also tried to use rectForHeaderInSection, it did not work either.
Did anyone use UIImageView for viewForHeaderInSection?
victor_zzm is offline   Reply With Quote
Old 01-03-2009, 11:18 PM   #5 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 1
Default Re: Default TableView section header background color

Here's the UILabel info for tableView headers:

Plain
fontName: Helvetica-Bold
pointSize: 18.000000
textColor: UIDeviceWhiteColorSpace 1 1
shadowColor: UIDeviceWhiteColorSpace 0 0.44
shadowOffset: CGSize 0 1


Grouped
fontName: Helvetica-Bold
pointSize: 17.000000
textColor: UIDeviceRGBColorSpace 0.298039 0.337255 0.423529 1
shadowColor: UIDeviceWhiteColorSpace 1 1
shadowOffset: CGSize 0 1


As for the background of the plain style header, that's a UIImage, not simply a backgroundColor. Notice the subtle vertical gradient.
kristian.takvam 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
UILabel background color mademo iPhone SDK Development 3 02-10-2010 09:04 AM
TableView sasikantpradeep iPhone SDK Development 3 12-09-2008 05:36 PM
How do I create my default.png? Fastrak iPhone SDK Development 4 08-22-2008 03:18 AM
Removing Last Table Section jablair iPhone SDK Development 13 06-27-2008 08:32 AM
TableView in IB? BuschyBoy iPhone SDK Development 5 05-15-2008 11:55 AM

» Advertisements
» Stats
Members: 41,861
Threads: 49,770
Posts: 213,057
Top Poster: BrianSlick (3,139)
Welcome to our newest member, melodizzzy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:01 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0