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 8361141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:38:01+00:00 2026-06-09T11:38:01+00:00

I am having some issues creating my own custom Take Picture button. Basically, when

  • 0

I am having some issues creating my own custom “Take Picture” button. Basically, when I remove the default controls, the camera no longer does a shutter animation or goes through the editing process, just goes straight to the delegate method.

So, here’s some code. At first I was using the default layout, like so:

(by the way, I’ve removed my if statements for determining hardware availability – they’re irrelevant.)

UIImagePickerController *picker = [[UIImagePickerController alloc] init];

picker.delegate = self;
picker.allowsEditing = YES;


picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.showsCameraControls = YES;
picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;     

[self presentModalViewController:picker animated:YES];

With this code, when I press the default “take photo” button, the shutter animation is fired, and the “Move and Scale” view is displayed. Upon pressing “choose”, the delegate gets called, and I am able to access the editing result via info.

So here’s my new initialization code with a custom “take photo” button and nothing else; by the way, I’m initializing this UIImagePickerController in the viewDidAppear method of my ViewController

UIImagePickerController *picker = [[UIImagePickerController alloc] init];

picker.delegate = self;
picker.allowsEditing = YES;

UIButton *shoot = [[UIButton alloc] initWithFrame:CGRectMake(110, 420, 100, 40)];
[shoot setTitle:@"Shoot" forState:UIControlStateNormal];
[shoot.titleLabel setTextColor:[UIColor whiteColor]];
[shoot addTarget:picker action:@selector(takePicture) forControlEvents:UIControlEventTouchUpInside];

picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[picker.cameraOverlayView addSubview:shoot];
picker.showsCameraControls = NO;

picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;

[self presentModalViewController:picker animated:YES];

In this example, when I hit my custom button, no animations are fired, no editing screen is shown, the delegate is called immediately.

Funny thing is, if I just change the showsCameraControls property to YES in the above example, my custom button behaves exactly the way the default button behaves in my first example.

Pretty stumped on this one, is there something I need to do in didFinishPickingMediaWithInfo to invoke the image editor, or am I just missing something in my initialization?

I’m using Xcode 4.3 and iOS 5.1 (the app is targeted for 5.0)

Any help greatly appreciated; Cheers!

  • 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-06-09T11:38:02+00:00Added an answer on June 9, 2026 at 11:38 am

    So apparently the “Move and Crop” functionality is part of the default camera controls

    When you use photo library as your source, the only option is default, so it always works.

    In the end, I wrote my own “move and crop” view using a simple scroll view and some overlay views to represent the crop box.

    Not too hard, just have to do some math based on zoom factor and contentoffset of the UIScrollView.

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

Sidebar

Related Questions

I am having some issues creating the code which should show a button only
Having some issues with the ... in ObjectiveC. I'm basically wrapping a method and
I am having some issues creating a setup file for my Outlook 2007 add-in.
I'm having some issues with a regular expression I'm creating. I need a regex
I'm creating a shopping cart application and I'm having some issues with implementing a
I am having some serious pathing issues with a website that I am creating.
I'm creating a database using entity framework code first and I'm having some issues
I have been having some issues with creating a connection to amazon's MWS service.
I'm having some issues on creating a fade in effect of a grid. I
The code is below but I am having some issues with creating a relative

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.