UITableView with Transparent Gradient at Top and Bottom

后端 未结 4 1816
广开言路
广开言路 2021-02-09 09:54

I have searched this forum, Google and other forums and have not found an the answer to my particular issue.

Basically, I have a UIView which contains

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-09 10:16

    Replace this line:

    [[[self scoreTableView] layer] addSublayer:[self maskLayer]];
    

    With this one:

    self.scoreTableView.layer.mask = self.maskLayer;
    

    (Or if you insist on your syntax-styling even thought I can't see why) :

    [[[self scoreTableView] layer] setMask:[self maskLayer]];
    

    Also this answer might help you.

提交回复
热议问题