New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Cell Size ( or number of items in one column) #4
Comments
Hey there @chlebta you are right about the cell column counts being multiples of 2. More information about how the algorithm works can be found on the blog post I've linked from the README. This multiples of 2 behaviour goes hand in hand with the layout algorithm and changing it to something else would require a different process. Now about the column sizes - they can be changed by implementing Happy coding! |
@JVillella This Will change the height from small to double the height of small cell thats all but i want to use custom height and width. Also the blog link doesn't work . *So the screen will be divide into 3 column. I'm new on objective and IOS world but Algorithm and mathematic I got great skills, so if you don't mind we can work's on optimizing this library ? |
I see what your saying. Many of us would benefit from more customizable mosaic sizing. If you'd like to try some experiments and see what you can do - that would be awesome! I think the site is up now, give it another try. |
@JVillella Yes the site work's now and I'm will give try to optimize this library and make it more simple and customizable 👍 also can I get your email to talk directly and in case of trouble. |
That would be great thanks! My email is in the podspec of the repo's root. So that others can learn from your progress it may be best to keep our chats on this thread. I reply quickly either way. |
@JVillella Hello, is there any rapid hack to add third type of Cell (where width = 2*Small Cell width ; and height = normal small Cell height) ? |
The algorithm asks the
We work in columns, which again is provided by the delegate in:
We use a buffer to store small cells until we have 2 (enough to fill the width of a column). This is when we actually add it to our column heights array property (currently named If we have leftover small cells after this process (because there weren't 2 to pair together) we handle them separately (see the commented code block about this). The column heights property maintains the height of each column in each section. It's a 2D array - an array of sections, and heights per column in each section. The majority of the rest of code deals with
Yes this can be done. It's relatively similar to how the small cells are buffered and then added to those two properties (cell heights array, layout attributes). This shouldn't be hard to do - probably a few lines. Good luck. Hope that helps! |
Hello, thank's this really simple and great Library and I need to know how can I change the cells size and use my costum size.
Also I've noticed that the number of cells in rows is always multiplier of 2 (2 cells, 4 cells, 8 cells ... in a row) and the big cell size is 2 cells for width and height.
So it will be more nicer if you allows user to define the number of cell in row and the big cell size (for example 3cell for height and 4 for width).
Also I'm ready to contribute in this project
The text was updated successfully, but these errors were encountered: