DAMM108
DAMM108

Reputation: 960

Algorithm to find number of images (different sizes) that fit on iPad screen

I have any array of image with sizes like the following,

  1. image1 (300,200)
  2. image2 (600,200)
  3. image3 (1024,768)
  4. image4 (340,400)
  5. image5 (200,300)
  6. image6 (541,768)
  7. image7 (120,200)
  8. image8 (500,200)
  9. image9 (200,200)
  10. image10 (285,400)

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

Answers (1)

Related Questions