uicollectionview

Dynamic height for a UITableView based on a dynamic collection view

☆樱花仙子☆ 提交于 2021-02-08 02:00:04
问题 I have to add a UICollectionView inside a UITableViewCell . The collectionView can have a different number of items. So the collectionView should adjust properly inside the tableView . I have implemented this inside my Project: https://github.com/vishalwaka/DynamicCollectionViewInsideTableViewCell In my case, the height of the cell is not being the adjusted after the height of the collectionView is set. How can I set the collectionView to not be scrollable and also show all content inside the

reloadData in performBatchUpdates:completion: does not call cellForItemAtIndexPath:

試著忘記壹切 提交于 2021-02-07 20:07:19
问题 So I was playing around my UITableView when I noticed that this code: [self performBatchUpdates:^{ [self reloadData]; } completion:^(BOOL finished) {}]; does not lead to cellForItemAtIndexPath: being called, only sizeForItemAtIndexPath of UICollectionViewFlowLayout is called. Does anybody have any idea why this is happening? I know exactly what happens in reloadData but this is different from that. 回答1: From the docs of reloadData : "It should not be called in the methods that insert or

Stretchy Header for UICollectionView

半世苍凉 提交于 2021-02-07 19:16:20
问题 I am trying to create a stretchy header using a collectionview section header. There are a bunch of different ways to do this but I am just looking for the simplest and most straight forward method with clear insturctions on what to do. Has anybody seen a simple guide on doing this in Swift 3 or can you explain how this would be done here? I don't think it should be that difficult. I would like to use the UICollectionViewDelegateFlowLayout and the ScrollviewDelegate becuase I think that would

Stretchy Header for UICollectionView

三世轮回 提交于 2021-02-07 19:15:18
问题 I am trying to create a stretchy header using a collectionview section header. There are a bunch of different ways to do this but I am just looking for the simplest and most straight forward method with clear insturctions on what to do. Has anybody seen a simple guide on doing this in Swift 3 or can you explain how this would be done here? I don't think it should be that difficult. I would like to use the UICollectionViewDelegateFlowLayout and the ScrollviewDelegate becuase I think that would

Stretchy Header for UICollectionView

本秂侑毒 提交于 2021-02-07 19:14:59
问题 I am trying to create a stretchy header using a collectionview section header. There are a bunch of different ways to do this but I am just looking for the simplest and most straight forward method with clear insturctions on what to do. Has anybody seen a simple guide on doing this in Swift 3 or can you explain how this would be done here? I don't think it should be that difficult. I would like to use the UICollectionViewDelegateFlowLayout and the ScrollviewDelegate becuase I think that would

Synchronize scrolling with two collection views in Swift?

自闭症网瘾萝莉.ら 提交于 2021-02-07 10:54:32
问题 Is there a practice to scroll a collection view with cells, and, depending on its content offset, scroll the other collection view? I have a main collection view that has two cells and scrolls horizontally. Then I have a second collection view with cells that scrolls vertically. What happens is when I scroll up, then scroll horizontally to the second vertical cv, it's not synced with relation to the first. I overrode the scrollViewDidScroll inside the vertically scrolling collection view (not

UIcollectionView cellForItemAtIndexPath returns Null in iOS 10 only. Works fine in iOS 9 and iOS 8

故事扮演 提交于 2021-02-07 09:21:06
问题 I have an app that been happily shipping for a couple of years. It retrieves RSS Feeds in a UICollectionView. The cellForItemAtIndexPath method sets text and calls a datasource method to load an image from a link specified in the feed. If none exists it loads the web page data and searches for <img> tags to get an image. Once the image is found/loaded the delegate method is called to add the image to the cell. (below) When running in iOS 8 and 9 everything is happy, but when running in iOS 10

UIcollectionView cellForItemAtIndexPath returns Null in iOS 10 only. Works fine in iOS 9 and iOS 8

本秂侑毒 提交于 2021-02-07 09:19:03
问题 I have an app that been happily shipping for a couple of years. It retrieves RSS Feeds in a UICollectionView. The cellForItemAtIndexPath method sets text and calls a datasource method to load an image from a link specified in the feed. If none exists it loads the web page data and searches for <img> tags to get an image. Once the image is found/loaded the delegate method is called to add the image to the cell. (below) When running in iOS 8 and 9 everything is happy, but when running in iOS 10

How to properly add an UICollectionView inside UITableViewCell using IOS 12

点点圈 提交于 2021-02-06 14:01:34
问题 For some reasons I cannot properly display some items from a collection inside an tableview cell when using Xcode 10 beta. I tried all I know for the last 4 days. I made a small project sample to see what my issue is. Full code is here if someone wants to run it locally: https://github.com/adrianstanciu24/CollectionViewInsideUITableViewCell I first add an table view with 2 different resizable cells, first cell has the collection view and a label: class ViewController: UIViewController,

How to properly add an UICollectionView inside UITableViewCell using IOS 12

谁都会走 提交于 2021-02-06 13:58:22
问题 For some reasons I cannot properly display some items from a collection inside an tableview cell when using Xcode 10 beta. I tried all I know for the last 4 days. I made a small project sample to see what my issue is. Full code is here if someone wants to run it locally: https://github.com/adrianstanciu24/CollectionViewInsideUITableViewCell I first add an table view with 2 different resizable cells, first cell has the collection view and a label: class ViewController: UIViewController,