-
-
Save Spongenuity/aa96bb882d23f645f6b7 to your computer and use it in GitHub Desktop.
No visible @interface for 'UIView' declares the selector 'captureImage'
This file contains 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
#import "ViewController.h" | |
#import "LTUCameraView.h" | |
#import "LTUManager.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
CGFloat screenAspectRatio = self.view.frame.size.height / self.view.frame.size.width; | |
CGFloat normalizeRatio = screenAspectRatio / 1.3; | |
CGRect cameraFrame = CGRectMake(0, | |
0, | |
self.view.frame.size.width * normalizeRatio, | |
self.view.frame.size.height); | |
self.camView = [[LTUCameraView alloc] initWithFrame:cameraFrame]; | |
[self.view insertSubview:self.camView atIndex:0]; | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
- (IBAction)snap:(id)sender {NSLog(@"Snap!"); | |
UIImage *image = [self.camView captureImage]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment