UILabel shadow from custom cell selected color

前端 未结 4 1958
后悔当初
后悔当初 2020-12-29 12:48

I\'m loading a custom nib file to customize the cells of a UITableView. The custom nib has a UILabel that is referenced from the main view by tag. I would like to know if it

4条回答
  •  情话喂你
    2020-12-29 13:40

    The simple answer, at least for the example shown above, is to not display the shadow in the first place. Since you can't see the white-on-white anyway, set the shadowColor to -clearColor.

    If you actually need a shadow though, overriding the -setHighlighted method is the best solution. It keeps the code with the cell, which I think is better than trying to handle it from the table view.

提交回复
热议问题