2

I would like to create a collage of images (about 7) of varying shapes and sizes within a UIView.

I originally tried to do it manually using auto layout & constraints. But it's sloppy.

I was thinking of using UICollectionView...probably not a flow but a general layout.

Is there a tutorial, cookbook and/or literature that can explain how to create a collage/template from an array of images (png)?

Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
  • Any chance that you can let us know if one of the suggestions below works? I'd also be interested if you care to share any alternate solution you may have come up with.. – Tommie C. Aug 10 '15 at 13:50
  • Have you got any Tutorial regarding photo collage ? @Frederick – Khushbu Desai Sep 27 '17 at 11:31

3 Answers3

1

There's a tutorial that I saw here. I'm not sure if it is what you want. It's in Objective-C though. http://what-when-how.com/ios-4/collage-an-image-example-ios-4/

UPDATE* I found something that may be useful but in swift - http://www.raywenderlich.com/78551/beginning-ios-collection-views-swift-part-2

Jesse Onolemen
  • 1,277
  • 1
  • 15
  • 32
0

Check out the solution I propose on this question (How to efficiently create a multi-row photo collage from an array of images in Swift). The ideas produce a rectangular solution of only one size but you might look at scaling the image appropriately to attain the utile sizes. Essentially I use CGGraphics to create rectangles and then draw images within each CGRect.

Community
  • 1
  • 1
Tommie C.
  • 12,895
  • 5
  • 82
  • 100
0

See my answer to the question that Tommie C is referring to. It builds on Tommie C's answer but gives a bit different results.

Community
  • 1
  • 1
guido
  • 2,792
  • 1
  • 21
  • 40