开发者

Title for section in UITableView - remove text shadow?

I have a g开发者_StackOverflow中文版rouped UITableView with black background color. Thus the gray section headers with the white drop shadows are unreadable. Next thing to know, the section height varies depending on language and section.

How to solve this the most easy way ?

If I implement viewForHeaderInSection I also need to implement heightForHeaderInSection, but the height varies (several sections with different title and different language => different text length/view height)


You need to dynamically determine the height of the cell, and set your label so that it autosizes itself.

Hope this link will be helpful to you.

All the best.


I had the same issue in 6.1. This worked for me:

 - (void) viewDidLoad {

[super viewDidLoad];
[self.tableView setBackgroundView:nil];
self.tableView.backgroundColor = [UIColor blackColor];
[[UILabel appearance] setShadowColor:[UIColor clearColor]];
[[UILabel appearance] setTextColor:[UIColor lightGrayColor]];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜