Reputation: 960
I have any array of image with sizes like the following,
Basically I want to develop an algorithm or function which can determine the total number of images that can fit on iPad landscape screen[1024 *768] in one UIViewController
.
Any pointers?
Upvotes: 2
Views: 140
Reputation: 81
You have a packing problem (http://en.wikipedia.org/wiki/Packing_problem).
There are many algorithms, you can start here:
http://www.codeproject.com/KB/web-image/rectanglepacker.aspx
See also:
Upvotes: 2