[英]Ios- Ipad- UicollectionViewCell- icon on a cell- how to add tap gesture to icon in xcode 5?
[英]How to add hamburger icon to the right side of UICollectionViewCell
我有一個UICollectionView
,可以在其上點擊並按住一個單元格以對其重新排序:
class ToWatchController: UICollectionViewController, UICollectionViewDelegateFlowLayout {
...
override func collectionView(_ collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) {
...
}
}
但是我想在單元格的右側添加一個漢堡包圖標,以向用戶指示可以對表進行重新排序。 像這樣:
是否有某種“默認”方法可以執行此操作,否則我將不得不在單元格的右側手動添加漢堡包圖像?
沒有快捷方式,就像UITableViewCell
。 將圖像添加到UICollectionViewCell
的唯一方法是自己添加UIImageView
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.