Get Updates By E-mail 

Article Written By:
Johann Dowa

UICollectionView Based Component For Automatically Creating Balanced Photo Galleries

  •  
  •  
  •  
  •  
  •  

Previously I mentioned a UICollectionView based component for creating Pinterest waterfall views ideal for dynamically updating content and an in-depth tutorial on how to create custom UICollectionView layouts.

Here’s another UICollectionView based component for displaying photos called NHBalancedFlowLayout from Niels de Hoog.

NHBalancedFlowLayout uses a special algorithm to maximize the use of provided screen space while keeping the images at the largest size possible. The algorithm considers the aspect ratio, and resizes images to the same height producing a terrific image display.

You can find NHBalancedFlowLayout on Github here.

You can read more about the algorithm used over on the Crispy Mountain website.

Included is a full demo showing the layout in action.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments