Created
October 17, 2011 09:21
-
-
Save ahmetardal/1292278 to your computer and use it in GitHub Desktop.
SSPhotoCropperViewController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@protocol SSPhotoCropperDelegate<NSObject> | |
@optional | |
- (void) photoCropper:(SSPhotoCropperViewController *)photoCropper | |
didCropPhoto:(UIImage *)photo; | |
- (void) photoCropperDidCancel:(SSPhotoCropperViewController *)photoCropper; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma - | |
#pragma SSPhotoCropperDelegate Methods | |
- (void) photoCropper:(SSPhotoCropperViewController *)photoCropper | |
didCropPhoto:(UIImage *)photo | |
{ | |
self.croppedPhoto = photo; | |
self.photoPreviewImageView.image = photo; | |
[photoCropper dismissModalViewControllerAnimated:YES]; | |
} | |
- (void) photoCropperDidCancel:(SSPhotoCropperViewController *)photoCropper | |
{ | |
[photoCropper dismissModalViewControllerAnimated:YES]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSPhotoCropperViewController *photoCropper = | |
[[SSPhotoCropperViewController alloc] initWithPhoto:photo | |
delegate:self | |
uiMode:SSPCUIModePresentedAsModalViewController | |
showsInfoButton:YES]; | |
[photoCropper setMinZoomScale:0.75f]; | |
[photoCropper setMaxZoomScale:1.50f]; | |
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:photoCropper]; | |
[self presentModalViewController:nc animated:YES]; | |
[photoCropper release]; | |
[nc release]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment