How to mask UITableViewCells underneath a UITableView Transparent Header

后端 未结 10 1923
后悔当初
后悔当初 2020-12-08 07:29

I want the header to mask the cells, but not the background.

I have a UITableView with transparent headers and cells similar to Apple\'s Notification Center (when yo

10条回答
  •  时光取名叫无心
    2020-12-08 07:46

    This wouldn't work if you wanted to show content behind your table view, but, since I'm only trying to create rounded headers with a plain solid colour background behind them, what solved it for me was mimicking transparency by setting the background colour of the header's background view to the background colour of the table view (or the first parent view with an opaque background).

提交回复
热议问题