Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6945449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:26:14+00:00 2026-05-27T13:26:14+00:00

this is my code: UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.showsCameraControls

  • 0

this is my code:

UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.showsCameraControls = NO;
picker.allowsEditing = NO;
picker.delegate = self;
picker.navigationBarHidden = YES;
picker.toolbarHidden = YES;
picker.wantsFullScreenLayout = YES;

UIView *overlay = [[UIView alloc] initWithFrame:CGRectZero];
overlay.backgroundColor = [UIColor greenColor];
overlay.alpha = 0.3;
overlay.clipsToBounds = NO;

UIButton *takePictureButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 1024, 1024)];
[takePictureButton addTarget:self action:@selector(takePictureButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
takePictureButton.backgroundColor = [UIColor purpleColor];
[overlay addSubview:takePictureButton];

picker.cameraOverlayView = overlay;
[takePictureButton release];
[overlay release];

_currentPicker = picker;
[self presentModalViewController:picker animated:YES];
[picker release];

And it’s look like on iPad 2 with iOS 4.3.2:
sorry, I can’t post image
What I want is it can take picture when user tap anywhere on the screen.
Forgive my poor English.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:26:15+00:00Added an answer on May 27, 2026 at 1:26 pm

    I solved this question by myself:
    just reset the size of cameraOverlayView after present UIImagePickerController.
    code like this:

    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.sourceType = UIImagePickerControllerSourceTypeCamera;
    picker.showsCameraControls = NO;
    picker.allowsEditing = NO;
    picker.delegate = self;
    
    UIButton *takePictureButton = [[UIButton alloc] initWithFrame:CGRectZero];
    [takePictureButton addTarget:self action:@selector(takePictureButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
    
    picker.cameraOverlayView = takePictureButton;
    [self presentModalViewController:picker animated:YES];
    
    takePictureButton.frame = CGRectMake(0, 0, 1024, 1024);
    
    [picker release];
    [takePictureButton release];
    

    Although it’s not elegant, but it work 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code for UIImage picker photoImagePicker=[[UIImagePickerController alloc]init]; photoImagePicker.delegate=self; photoImagePicker.sourceType=UIImagePickerControllerSourceTypeCamera; photoImagePicker.mediaTypes=[UIImagePickerController availableMediaTypesForSourceType:photoImagePicker.sourceType]; [self
UIImagePickerController *ii_picker= [[UIImagePickerController alloc] init]; ii_picker.delegate=self; ii_picker.sourceType=UIImagePickerControllerSourceTypeCamera; add_photo=NO; [self presentModalViewController:ii_picker animated:YES]; [ii_picker release]; This
-(IBAction)selectPressed:(id)sender { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
I have this code: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissModalViewControllerAnimated:YES]; ... }
I have this code in my iOS app: - (IBAction)cameraButtonPressed:(id)sender { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]
I am using following code to choose image from camera role picker= [[UIImagePickerController alloc]
I'm using the following code in my UIImagePickerController delegate: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
In my app, I have write this code for capture video -(IBAction)takeVideo:(id)sender { [self
I have a UIImagePickerController that is shown [self presentModalViewController:self.picker animated:NO]; Then later on the
This is my code to present the UIImagePickerController: // Show the media browser with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.