uicollectionview

Implement 3D touch on multiple collection views or table views in the same view controller

谁说我不能喝 提交于 2019-12-24 07:20:54
问题 I would like to have 3D touch on both of the collection views of my app(Only the "Peek" functionality). They are both contained in the same view controller. No matter what syntax I try it always shows the image and text for the a cell in the first collectionview, even if I choose a cell in the second collection view. How do I separate these so that only one happens specifically for the collectionview cell I have selected? Here is how I am implementing the 3D touch functionality: I put this in

On iOS, can you use UICollectionViewFlowLayout to get a vertical column layout?

风流意气都作罢 提交于 2019-12-24 06:59:15
问题 UICollectionViewFlowLayout goes left-to-right in a row, then wraps to the next row. I want a layout that goes top-to-bottom, then wraps back up to the next column. Think of it as a UITableView that wraps into multiple columns, which scrolls horizontally. UICollectionViewFlowLayout is close to what I want – can I subclass it or must I subclass UICollectionViewLayout and start from scratch? (This answer leads me to believe I can't use flow layout.) Visible Screen [ 1 6 11 ] 16 [ 2 7 12 ] 17 [ 3

On iOS, can you use UICollectionViewFlowLayout to get a vertical column layout?

偶尔善良 提交于 2019-12-24 06:59:10
问题 UICollectionViewFlowLayout goes left-to-right in a row, then wraps to the next row. I want a layout that goes top-to-bottom, then wraps back up to the next column. Think of it as a UITableView that wraps into multiple columns, which scrolls horizontally. UICollectionViewFlowLayout is close to what I want – can I subclass it or must I subclass UICollectionViewLayout and start from scratch? (This answer leads me to believe I can't use flow layout.) Visible Screen [ 1 6 11 ] 16 [ 2 7 12 ] 17 [ 3

UICollectionView inside UICollectionView will not scroll

大城市里の小女人 提交于 2019-12-24 06:49:07
问题 I have a UICollectionView in each cell of another UICollectionView. The outer UICollectionView scroll fine vertical, but the UICollectionView inside each cell from the vertical UICollectionView will not scroll, and I have no clue why. Here is my ViewController: using System; using Foundation; using UIKit; namespace ColInColTest { public partial class ViewController : UIViewController, IUICollectionViewSource, IUICollectionViewDelegate { UICollectionViewFlowLayout LayoutOne; UICollectionView

Does SDWebImage support “not-when-fast-scrolling” (skimming) for lazy loading?

萝らか妹 提交于 2019-12-24 04:42:08
问题 When doing lazy loading (table of UICollectionView), for a correct result, you should NOT begin downloads, when the user is scrolling very quickly over the collection. So, imagine a vertical scroll with 200 panels each with an image; four or five are seen onscreen at a time. When it first loads, the first 4 visible images should begin loading. If you scroll down a little, the newly visible images should begin to load. BUT if the user: very quickly scrolls down to (say) position 100 and then

iOS UICollectionView: Cells not showing

巧了我就是萌 提交于 2019-12-24 04:35:08
问题 I'm missing something obvious here as this isn't a difficult task. I have my Collection view in storyboard (amongst other views), with the prototype cell's reuse id being "Cell", and a UILabel in that cell, with a tag of 100. The code (boilerplate): - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return 4; } - (UICollectionViewCell *

Collectionview performBatchUpdates crash

蓝咒 提交于 2019-12-24 03:53:27
问题 I am trying to add new items to my collection view using insertItemsAtIndexPaths. My app crashes at performBatchupdate - (void) addItems { NSArray *newProducts = @[@"1",@"2",@"3",@"4"]; [self.collectionView performBatchUpdates:^{ NSMutableArray *arrayWithIndexPaths = [NSMutableArray array]; for (NSInteger index = self.array.count; index < (self.array.count + newProducts.count); index++) { [arrayWithIndexPaths addObject:[NSIndexPath indexPathForRow:index inSection:0]]; } [self.array

Auto Height of UICollectionView inside UITableViewCell

╄→尐↘猪︶ㄣ 提交于 2019-12-24 02:48:10
问题 I want to create a cell that consist of title text, description text, and a collection view. So I tried to created a cell like this I added top, trailing, and leading to superview constraint for title and description . Then I also add top, bottom, trailing, and leading constraint to my UICollectionView . For auto height my tableview cell, I override viewWillAppear override func viewWillAppear(_ animated: Bool) { tableView.estimatedRowHeight = 300 tableView.rowHeight =

UICollectionView deselectItem when cell pre-fetching is enabled

有些话、适合烂在心里 提交于 2019-12-24 02:17:31
问题 On iOS 10.0, UICollectionView pre-fetches cells by default. This leads to cells that are prepared for being shown on screen, but are hidden. This question describes it really well. The following code will successfully deselect an index path when its cell is either visible or does not exist at all. If the cell exists and is hidden, the index path will be deselected, but the cell becomes stuck in the selected state until it is reused. collectionView!.deselectItem(at: indexPath, animated: false)

How to push VC from Custom CollectionViewCell Which is on TableViewCell?

為{幸葍}努か 提交于 2019-12-24 02:05:00
问题 I am Having a tableView and Cell, on Cell i have a collectionView and Displaying Some Content On it . I want to send a link on selection of indexPath . I want to push/present My View from Custom CollectionViewCell which is on TableViewCell . class secondTopicTableViewCell: UITableViewCell { @IBOutlet weak var relatedCustom: UICollectionView! var relArray = NSArray() func loadArray(arr: NSArray) { self.relArray = arr self.relatedCustom.reloadData() } } extension secondTopicTableViewCell :