قالب وردپرس درنا توس
Home / IOS Development / CollectionView in UITableView with AutomaticCell height has height ~ 10px to TableView scrolling: iOSProgramming

CollectionView in UITableView with AutomaticCell height has height ~ 10px to TableView scrolling: iOSProgramming



I have 3 collection views in a table view of three rows. The first two table rows have UICollectionViews with HORIZONTAL scrolling. When I load my data into these two collection views, I pack the contents of the cells, and TableViewCell matches the collection's display ratio.

Now, the third is difficult. This is TableViewCell with VERTICAL roll. When the data is loaded into the TableViewCell height, it is 10px high. When I force, TableView scrolls and forces the cell to go off the screen, automatically resizing the cell to fit the entire CollectionView. Each cell in CollectionView has a height of 300 px and a width of half the screen size (2 column layout).

When I set the scroll to HORIZONTAL, it works well. Proper height is assumed. But with vertical. I also set my estimated height to 600 px for each TableViewCell.

How can I solve this problem?


Source link