ADMozaicCollectionViewLayout | yet another UICollectionViewLayout subclass | DevOps library
kandi X-RAY | ADMozaicCollectionViewLayout Summary
kandi X-RAY | ADMozaicCollectionViewLayout Summary
ADMozaicCollectionViewLayout is yet another UICollectionViewLayout subclass that implements "brick" or "mozaic" layout.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ADMozaicCollectionViewLayout
ADMozaicCollectionViewLayout Key Features
ADMozaicCollectionViewLayout Examples and Code Snippets
Community Discussions
Trending Discussions on ADMozaicCollectionViewLayout
QUESTION
Given that using the minimumInteritemSpacing / minimumLineSpacing settings on an iOS collection view creates a space rather than a solid border between cells, how can we style a solid border of consistent width around each cell in a collection view grid with a seperate colour applied as the background to the main collection view (so that after the border of the last cell a different background colour is visible) using these methods?
This is the best example of a solution I have seen so far but it is for objective C only rather than swift 3. The author also outlines the shortcomings of a couple of approaches I have already tried:
UICollectionView custom line separators
As an additional note the grid contains items of varying dimensions as illustrated here:
github.com/Antondomashnev/ADMozaicCollectionViewLayout
Edit - Here is an image of the effect I'm trying to achieve:
It also highlights the problem that whil]1st the blue borders are most easily created using minimumInteritemSpacing / minimumLineSpacing the spaces created (whilst accurate and evenly spaced) just show the colour of the background view beneath the cells so you are left with one solid colour as opposed to the blue and yellow combination shown in the image.
...ANSWER
Answered 2017-Jun-09 at 01:02I was able to get the result I wanted by setting a minimumLineSpacing and minimumInterimItemSpacing value of 0 to group the cells together and dynamically adding / removing borders as CALayers using krotov's answer here: UIView bottom border?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ADMozaicCollectionViewLayout
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page