Created
May 25, 2012 21:08
-
-
Save jacksonfdam/2790564 to your computer and use it in GitHub Desktop.
Add a image layer over camera
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
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