我正在使用自定義圖形複製原始的UITableView節標題。什麼是UITableView節標題中的字體大小,字體顏色,陰影顏色和偏移量?
什麼字體大小,字體顏色,陰影顏色&中的UITableView節頭偏移?
謝謝。
我正在使用自定義圖形複製原始的UITableView節標題。什麼是UITableView節標題中的字體大小,字體顏色,陰影顏色和偏移量?
什麼字體大小,字體顏色,陰影顏色&中的UITableView節頭偏移?
謝謝。
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);
希望這將滿足您的要求......
試試這個公式:
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];
如果你指的是預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
,然後創建一個作爲測試,並抓住其標籤的其它屬性(字體,等等。)。