Latest 1.0.1
License MIT
Platforms ios 7.0, requires ARC
Dependencies BlocksKit, SDWebImage
Frameworks UIKit, Foundation

Custom UIView for displaying interactive collage from images

Have you ever been inspired by Google+ albums organisation? Photos are aligned exactly side by side with preserving tha aspect ratio. Now you can do that in your iOS application.

alt demo

You can pass a varied number of images with different sizes and it is ok. There is support for preloaded images passing by array property or using delegate and providing arbitary URLs for downloading (under the hood is the SDWebImage). You set constraint either by width or height and another dimension is calculated automatically. Also margin between images is supported.


Edit your PodFile to include the following line:

pod 'AACollageView'

Then import the main header.

#import <AACollageView.h>

Have a fun!

Example Usage

Create from code or storyboard with ready images array

AACollageView *collageView = [[AACollageView alloc] initWithFrame:self.view.frame];//or IBOutlet
collageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
[self.view addSubview:collageView];
collageView.imagesArray = images;
[collageView setupCollageConstraintsWithMargin:3 height:NAN orWidth:self.view.frame.size.width refreshCollage:YES];

Using with delegate

- (NSInteger)imagesCountInCollageView:(AACollageView *)collageView {
    return self.imageSizes.count;

- (CGSize)collageView:(AACollageView *)collageView sizeForImageAtIndex:(NSUInteger)index {
    return [self.imageSizes[index] CGSizeValue];

- (NSURL *)collageView:(AACollageView *)collageView URLForImageAtIndex:(NSUInteger)index {
    //Could be URL from the web
    return self.imageURLS[index];

- (void)collageView:(AACollageView *)collageView didTapAtImageView:(UIImageView *)imageView atIndex:(NSUInteger)index {
    //do something


Azat Almeev: [email protected]

Latest podspec

    "name": "AACollageView",
    "version": "1.0.1",
    "summary": "Custom UIView for displaying interactive collage from images",
    "description": "                   If you are looking for some way to organize photos in collage, AACollageView is right for you. It uses simple enough recursive algorithm to build an optimal structure of imagesn",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "azat.almeev": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": [
    "exclude_files": "Classes/Exclude",
    "public_header_files": "Classes/AACollageView.h",
    "frameworks": [
    "requires_arc": true,
    "dependencies": {
        "BlocksKit": [
            "~> 2.2.5"
        "SDWebImage": [
            "~> 3.7.1"

Pin It on Pinterest

Share This