uicollectionview

delete Single Core Data Item from a uicollectionviewCell using a button

蓝咒 提交于 2020-07-23 07:40:11
问题 I am trying to delete a single element of the coreData set using a button inside a collectionviewcell. So the cell has a label with the result of the core data fetch. When I hit the button it should delete the cell making it no longer appear. Also the the core data single set item should be perementley deleted. I have scence this used before in protocols but not using core data.The core data is var itemName. class CustomCell: UICollectionViewCell { @objc func delete() { }} class

delete Single Core Data Item from a uicollectionviewCell using a button

筅森魡賤 提交于 2020-07-23 07:39:19
问题 I am trying to delete a single element of the coreData set using a button inside a collectionviewcell. So the cell has a label with the result of the core data fetch. When I hit the button it should delete the cell making it no longer appear. Also the the core data single set item should be perementley deleted. I have scence this used before in protocols but not using core data.The core data is var itemName. class CustomCell: UICollectionViewCell { @objc func delete() { }} class

delete Single Core Data Item from a uicollectionviewCell using a button

社会主义新天地 提交于 2020-07-23 07:38:46
问题 I am trying to delete a single element of the coreData set using a button inside a collectionviewcell. So the cell has a label with the result of the core data fetch. When I hit the button it should delete the cell making it no longer appear. Also the the core data single set item should be perementley deleted. I have scence this used before in protocols but not using core data.The core data is var itemName. class CustomCell: UICollectionViewCell { @objc func delete() { }} class

Vertical UICollectionView with different item size

无人久伴 提交于 2020-07-22 10:58:49
问题 I want to create a UICollectionView that has different item size. It is similar to this image. It is a Vertical UICollectionView. class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = .white let layout = UICollectionViewFlowLayout() layout.scrollDirection = .vertical let collectionView = CollectionView(frame: .zero, collectionViewLayout: layout) view.addSubview(collectionView) collectionView.leadingAnchor.constraint(equalTo:

Vertical UICollectionView with different item size

瘦欲@ 提交于 2020-07-22 10:58:39
问题 I want to create a UICollectionView that has different item size. It is similar to this image. It is a Vertical UICollectionView. class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = .white let layout = UICollectionViewFlowLayout() layout.scrollDirection = .vertical let collectionView = CollectionView(frame: .zero, collectionViewLayout: layout) view.addSubview(collectionView) collectionView.leadingAnchor.constraint(equalTo:

How to hide scroll bar of UICollectionView

拜拜、爱过 提交于 2020-07-14 20:37:02
问题 I m working on a UICollectionView class, and it will display the scroll bar when I scroll on the list, it's possible to hide scroll bar when scrolling? 回答1: Objective C: [collectionView setShowsHorizontalScrollIndicator:NO]; [collectionView setShowsVerticalScrollIndicator:NO]; Swift 3.0 colView.showsHorizontalScrollIndicator = false colView.showsVerticalScrollIndicator = false From storyboard: 回答2: in Swift: collectionView.showsHorizontalScrollIndicator = false in Interface Builder: 来源: https

How to hide scroll bar of UICollectionView

女生的网名这么多〃 提交于 2020-07-14 20:34:01
问题 I m working on a UICollectionView class, and it will display the scroll bar when I scroll on the list, it's possible to hide scroll bar when scrolling? 回答1: Objective C: [collectionView setShowsHorizontalScrollIndicator:NO]; [collectionView setShowsVerticalScrollIndicator:NO]; Swift 3.0 colView.showsHorizontalScrollIndicator = false colView.showsVerticalScrollIndicator = false From storyboard: 回答2: in Swift: collectionView.showsHorizontalScrollIndicator = false in Interface Builder: 来源: https