2011-09-02 63 views

回答

0
UILabel * headerLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 
headerLabel.backgroundColor = [UIColor clearColor]; 
headerLabel.opaque = NO; 
headerLabel.textColor = [UIColor blackColor]; 
headerLabel.highlightedTextColor = [UIColor whiteColor]; 
headerLabel.font = [UIFont boldSystemFontOfSize:20]; 
headerLabel.frame = CGRectMake(10.0, 0.0, 300.0, 44.0); 

希望這將滿足您的要求......

1

試試這個公式:

headerLabel.font = [UIFont boldSystemFontOfSize:17]; 
headerLabel.shadowColor = [UIColor colorWithWhite:1.0 alpha:1.0]; 
headerLabel.shadowOffset = CGSizeMake(0, 1); 
headerLabel.textColor = [UIColor colorWithRed:0.265 green:0.294 blue:0.367 alpha:1.0]; 
0

如果你指的是預iOS7看,我取得了良好的結果與:

UITableViewHeaderFooterView *headerView = [[UITableViewHeaderFooterView alloc] init]; 
headerView.textLabel.text = title; 
headerView.textLabel.textColor = [UIColor whiteColor]; 
headerView.textLabel.shadowColor = [UIColor colorWithRed:0.40 green:0.42 blue:0.43 alpha:1.0]; 
headerView.textLabel.shadowOffset = CGSizeMake(0, 1); 

如果你不使用UITableViewHeaderFooterView,然後創建一個作爲測試,並抓住其標籤的其它屬性(字體,等等。)。