10000 GitHub - DonMag/AppleModernCollectionViews
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DonMag/AppleModernCollectionViews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppleModernCollectionViews

Modifications to Apple's Implementing Modern Collection Views sample app.

Please read the LICENSE file in the source code.


Edits to OrthogonalScrollingViewController to change layout from:

 +-----------------------------------------------------+
 | +---------------------------------+  +-----------+  |
 | |                                 |  |           |  |
 | |                                 |  |           |  |
 | |                                 |  |     1     |  |
 | |                                 |  |           |  |
 | |                                 |  |           |  |
 | |                                 |  +-----------+  |
 | |               0                 |                 |
 | |                                 |  +-----------+  |
 | |                                 |  |           |  |
 | |                                 |  |           |  |
 | |                                 |  |     2     |  |
 | |                                 |  |           |  |
 | |                                 |  |           |  |
 | +---------------------------------+  +-----------+  |
 +-----------------------------------------------------+

to:

+------------------------------+                  These would be off-screen
| +-------------------------+  |  +-------------------------+  +-------------------------+
| |            1            |  |  |            4            |  |                         |
| +-------------------------+  |  +-------------------------+  |                         |
| +-------------------------+  |  +-------------------------+  |                         |
| |            2            |  |  |            5            |  |            7            |
| +-------------------------+  |  +-------------------------+  |                         |
| +-------------------------+  |  +-------------------------+  |                         |
| |            3            |  |  |            6            |  |                         |
| +-------------------------+  |  +-------------------------+  +-------------------------+
|                              |
|                              |
|                              |
|     rest of the screen       |
|                              |
|                              |
|                              |
|                              |
+--------
672B
----------------------+

See StackOverflow question: https://stackoverflow.com/questions/72088824/uicollectionview-compositional-layout-with-orthogonal-scrolling-and-a-different


January 2025

Added example showing Orthogonal layout with 1-row / 2-rows / 1- row / 2-rows / etc

+-----------------------------------------------------+
| +-------------------+  +-------------------+  +-----|
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| +-------------------+  +-------------------+  +-----|
|                                                     |
| +----------------+  +----------------+  +-----------|
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| +----------------+  +----------------+  +-----------|
| +----------------+  +----------------+  +-----------|
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| |                |  |                |  |           |
| +----------------+  +----------------+  +-----------|
|                                                     |
| +-------------------+  +-------------------+  +-----|
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| |                   |  |                   |  |     |
| +-------------------+  +-------------------+  +-----|
+-----------------------------------------------------+

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0