Skip to content

zshannon/ZCSAvatarCapture

Repository files navigation

ZCSAvatarCapture

You've got user avatars in your app. You probably don't have user avatar editing as nice as this.

Add to your Podfile

pod 'ZCSAvatarCapture', '~> 0.0.5'

Use in your project

Setup

#import "ZCSAvatarCaptureController.h"

ZCSAvatarCaptureController *avatarCaptureController = [[ZCSAvatarCaptureController alloc] init];
avatarCaptureController.delegate = self;
avatarCaptureController.image = [UIImage imageNamed:@"model-001.jpg"]; // Use your current avatar image here
[self.avatarView addSubview:self.avatarCaptureController.view]; // self.avatarView is a placeholder on the Storyboard in this example

// You can manually initiate a capture session like so (thanks to @ssuchanowski)
[avatarCaptureController startCapture];

Capture

The delegate method imageSelected:(UIImage *)image will be called when the user completes capture.

- (void)imageSelected:(UIImage *)image {
	// Do something with your user's new avatar image
}

Screenshots

Example App with Avatar Example with Camera Example with Photo Example App after Avatar

Contributing

Send me Pull Requests here, please.

About

User avatar editing made nice.

Resources

Stars

Watchers

Forks

Packages

No packages published