Skip to content

Instantly share code, notes, and snippets.

@Spongenuity
Created October 14, 2013 18:31
Show Gist options
  • Save Spongenuity/aa96bb882d23f645f6b7 to your computer and use it in GitHub Desktop.
Save Spongenuity/aa96bb882d23f645f6b7 to your computer and use it in GitHub Desktop.
No visible @interface for 'UIView' declares the selector 'captureImage'
#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