How to recreate the default UIView the same as the default tableView:viewForHeaderInSection:?

后端 未结 4 656
面向向阳花
面向向阳花 2021-02-04 16:58

I tried to implement the

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

to get the text label of the

4条回答
  •  我寻月下人不归
    2021-02-04 17:48

    You can try to mimic it using shadowColor and shadowOffset.

    I have done it in black for example using code like the following:

    label.shadowColor = [UIColor whiteColor];
    label.shadowOffset = CGSizeMake(1, 1);
    

    By messing with the colors and shadow combinations, you can mimic the label pretty well.

提交回复
热议问题