Iva*_*ino 8 ios uicollectionview uirefreshcontrol swift3
我有一个UICollectionView常规拉动刷新实现,但不知何故,微调器和"拉动刷新"文本出现在集合视图项目上方;
如何在物品后面制作它?
这是我添加UIRefreshControll到的方式UICollectionView
let refreshControl = UIRefreshControl()
refreshControl.attributedTitle = NSAttributedString(string: "Pull down to refresh")
refreshControl.addTarget(self, action: #selector(pullToRefresh), for: UIControlEvents.valueChanged)
collectionView?.refreshControl = refreshControl
Run Code Online (Sandbox Code Playgroud)
Iva*_*ino 29
我想出来的方法是refreshControll zPosition使用以下内容将每个视图改为后面:
refreshControl.layer.zPosition = -1
Run Code Online (Sandbox Code Playgroud)
希望这对任何人都有帮助.
| 归档时间: |
|
| 查看次数: |
2028 次 |
| 最近记录: |