njdehoog / NHBalancedFlowLayout

UICollectionViewLayout subclass for displaying items of different sizes in a grid without wasting any visual space. Inspired by: http://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery
MIT License
1.34k stars 106 forks source link

Is it possible to not increase image size #1

Closed wimaha closed 11 years ago

wimaha commented 11 years ago

Hi,

very nice Controll!

Is it possible to change the behavior so that the images are not enlarged?

njdehoog commented 11 years ago

Thanks!

Currently the only way to control the size is by setting the preferredRowSize property, although this doesn't enforce a maximum size.

Enforcing a maximum size would be useful, although I'm not sure how to accomplish this yet. Feel free to issue a pull request if you come up with a solution.

On 9 nov. 2013, at 15:13, wimaha notifications@github.com wrote:

Hi,

very nice Controll!

Is it possible to change the behavior so that the images are not enlarged?

— Reply to this email directly or view it on GitHub.

wimaha commented 11 years ago

Thanks for the answer.

I'm using the preferredRowSize property and the result is near perfect!

I will close the issue. If there will be a solution for defining a max size for each image, someone could issue a pull request.