3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[tvOS] UITableViewのグラデーションマスクを削除する

Posted at

備忘録

tvOSではUITableViewを使うと、上下のスクロール領域が下記イメージのようにマスク処理されています。

これは、tvOSのUITableViewにはmaskプロパティにCAGradientLayerを含んだviewが設定されているためです。

・iOS

print(tableView.mask)

nil

・tvOS

print(tableView.mask)

<_UIScrollViewGradientMaskView: 0x7fcf41109930; frame = (-90 -40; 1920 1080); userInteractionEnabled = NO; layer = <CAGradientLayer: 0x6000032a6ee0>>

なので、不要の場合は

let tableView = UITableView()
tableView.mask = nil

でOK。

参考

mask - UIView | Apple Developer Documentation

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?