Skip to content

Instantly share code, notes, and snippets.

@jacksonfdam
Created May 25, 2012 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacksonfdam/2790564 to your computer and use it in GitHub Desktop.
Save jacksonfdam/2790564 to your computer and use it in GitHub Desktop.
Add a image layer over camera
ImagePicker = [[UIImagePickerController alloc] init];
ImagePicker.delegate = self;
#if TARGET_IPHONE_SIMULATOR
ImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
#elif TARGET_OS_IPHONE
ImagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
UIImageView *ImgOutline=[[UIImageView alloc] initWithFrame:CGRectMake(20, 28, 124, 404)];
ImgOutline.image=[UIImage imageNamed:@"outline.png"];
[ImagePicker.view addSubview:ImgOutline];
#endif
ImagePicker.navigationController.navigationBar.barStyle = UIBarStyleBlack;
ImagePicker.editing = YES;
[self presentModalViewController:ImagePicker animated:YES];
[ImagePicker release];
-(IBAction)Cameras:(id)sender
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:5];
[UIView setAnimationTransition:110 forView:self.view cache:NO];
[UIView commitAnimations];
Cameras *Cam = [[Cameras alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:Cam animated:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment