uicollectionview - Custom UICollectionViewLayout With Equal Inter-Item Spacing -


i'm having difficult time figuring out how designing feels should straightforward layout collection view. heights of each cell equal. widths vary. inter-item spacing should always equal. distance between rows should equal. more items added, width of collection view increase "intelligently." let me give example.

desired layout

when insert new item, calculate movement of items rows (maybe first item of row 1 moves row 0, maybe first item of row 2 moves row 1. move , collection view grows wider.

colors added illustrative purposes

i feel should reasonably straightforward i'm struggling. have sample code help?

have tried using uicollectionviewflowlayout?

http://skeuo.com/uicollectionview-custom-layout-tutorial

https://developer.apple.com/library/ios/documentation/uikit/reference/uicollectionviewflowlayout_class/


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -