Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Apr 6, 2009, 10:11 PM   #1
macrumors member
Join Date: Oct 2008
TableView header issue

I have a TableView of type: UITableViewStyleGrouped

In viewForHeaderInSection I return a UILabel:

UILabel* hdr = [[[UILabel alloc] initWithFrame:CGRectMake(40, 0, 280, 40)] autorelease];
hdr.opaque = YES ;
[hdr setTextColor:[UIColor whiteColor]];
UIFont *textHeaderFont = [UIFont fontWithName:@"Arial-BoldMT" size:16];
hdr.font = textHeaderFont;
hdr.backgroundColor = [UIColor clearColor];
hdr.text = @"title";
return hdr ;

... but it is not indented. It's x location is 0.

If I return a UITableViewCell the header is indented but there's about a 1 pixel white space just below it.

I can't figure out how to solve either problem. Any ideas?
99miles is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What would make images in the header pop out on top of the rest of the header? MuckrakerJG Web Design and Development 1 Feb 2, 2014 01:53 AM
Pages 5 default header Kashchei Mac Applications and Mac App Store 1 Jan 1, 2014 06:45 PM
ios7 tableView cell background color issue larswik iPhone/iPad Programming 11 Oct 6, 2013 12:37 PM
What do you think of the header bar? sonicrobby iOS 7 7 Sep 15, 2013 12:57 PM
iPhone: Cydia issue - No package header and Usr/bin/dpkg (2) roryhammond Jailbreaks and iOS Hacks 1 Feb 14, 2013 03:31 AM

Forum Jump

All times are GMT -5. The time now is 11:20 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC