Comments (2)
so i managed to get a collectionview to display by setting a height constraint but when i tap on the cells inside it the whole thing disappears.
from aloestackview.
Hi @shokaveli, thanks for your interest in AloeStackView.
Displaying a UICollectionView as a row in an AloeStackView is not supported out-of-the-box. One issue is that UICollectionView is also UIScrollView, just like AloeStackView is. Hence, adding one as a row will result in nested UIScrollViews that scroll in the same direction, which is something that is generally not supported by UIKit.
Another issue is that UICollectionView does not self-size to its contents, so AloeStackView (which just uses UIStackView under the hood) will not know how to size the row. As you discovered, you can work around this by giving it a fixed height constraint, but this won’t be based on the content it’s displaying so you’ll likely run into problems making it the correct height you want across devices (not to mention other issues you’ll run into getting it to display correctly).
In this case, you’re probably better off laying out the views inside the collection view manually inside their own view and adding that as a row, or not using AloeStackView and just using the collection view by itself.
Let me know if I can answer any more questions specific to AloeStackView!
from aloestackview.
Related Issues (20)
- AloeStackViewController to support child UIViewControllers as a row HOT 3
- Improved touch and tap handling of cells HOT 1
- Swift 5 support HOT 3
- s.swift_version = '5.0' HOT 1
- Carthage build error with Xcode 11.0 beta 4 HOT 2
- Presenting in popover on iOS 13 displays with incorrect insets HOT 7
- Embedding TableView as row HOT 1
- [Feature suggestion] Paging
- [Feature Suggestion] willDisplay/endDisplay
- [Question] Access to the cell HOT 2
- No way to get the RowCount HOT 1
- RTL support on horizontal stack?
- Get access to UIStackview HOT 1
- Cannot build with `swift build`
- [Feature Suggestion] Reorder cells
- Scrolling always on?
- [question] Add stackView to container (with Storyboard)
- Problem when build on simulator, Xcode Version 12.0.1 (12A7300)
- SPM support?
- Is this library maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aloestackview.