Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jagatnibas

macrumors regular
Original poster
Jul 28, 2008
126
0
Hi all,

I am trying to use a button as a custom header for UITableView

using following function

Code:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section  {
	
	[btnHeader setTitle:(NSString *)[@"Title"] forState:UIControlStateNormal];
    return btnHeader;
}

no matter how small i give the CGRect, it is expanded to cover fill header width !

how can I keep this button view to a certain width may be 100 px, not stretched to entire row / section length ?

thanks in advance and regards
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.