Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building An Interactive Grid View With UIKit

Goals

This demo shows a few techniques on how to build a re-ordable grid view based on stock UICollectionView API.

Here are the main UIKit APIs used by this demo:

  • UICollectionViews compositional layout API.
  • UICollectionViewDiffableDataSource and its reordering support.
  • UIContextMenuConfiguration for presenting optional menus from each displayed cell.

The view is driven by a two-column layout that supports two cell sizes:

  • Compact (half width)
  • Regular (full width)

Other goals

  • The layout must dynamically adjust while the user drags cells arounds.
  • The user must be able to long-press on cell to present a standard iOS context menu.

Additional details can be found in this blog post.

About

Demo project showing a technique for building a reorderable `UICollectionView` using compositional layout and other stock UIKit APIs.

Topics

Resources

Stars

21 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages