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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:52:13+00:00 2026-05-28T05:52:13+00:00

I have the below code in my app which displays a UIImagePicker minus the

  • 0

I have the below code in my app which displays a UIImagePicker minus the camera controls.

#define CAMERA_SCALAR 1.32 

@implementation CameraViewController

- (id)init {
// Remove standard controls from UIImagePicker and make full screen
if (self = [super init]) {
    self.sourceType = UIImagePickerControllerSourceTypeCamera;
    self.showsCameraControls = NO;
    self.navigationBarHidden = YES;
    self.toolbarHidden = YES;
    self.wantsFullScreenLayout = YES;
    self.cameraViewTransform = CGAffineTransformScale(self.cameraViewTransform, 1, CAMERA_SCALAR);          
}
return self;
}

Initially when I removed set showsCameraControls to NO I got a black bar on the screen where the controls had been. To offset this I added in the self.cameraViewTransform line to scale up the view.

This works, however it distorts the image. I think what I need to do is also scale the height by the same ratio as the width.

Can anyone advise me on the best way to do this ?

Thanks in advance !

  • 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-28T05:52:14+00:00Added an answer on May 28, 2026 at 5:52 am

    I may be misinterpreting your question, but to scale the width as well, you can

    self.cameraViewTransform = CGAffineTransformScale(self.cameraViewTransform, CAMERA_SCALAR, CAMERA_SCALAR);
    

    instead of

    self.cameraViewTransform = CGAffineTransformScale(self.cameraViewTransform, 1, CAMERA_SCALAR);
    

    But of course, this will push the sides of the camera view out of screen.

    In principle, I think there is no best choice in this case (showing exactly what the camera shows in fullscreen), because the origin of the problem is the difference of the aspect ratio of the screen/camera. You either have to miss part of the view, or distort the view, is my thinking.

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

Sidebar

Related Questions

I have the below code, which iterates over a list based on a custom
I have the below code for my a Dialog box for a which contains
So below is my code for my controller, which I have four of one
Below is sample code from a Module I have in my Flex app. I
I have a modal view in my app which displays a UIMapView. I then
I have an ipad app, which displays a powerpoint presentation from an NSData, within
At the moment I have listings enabled(see code below) which means everyfolder is affected.
I have below code in html. <li class=selected runat=server id=lihome><a href=/ISS/home.aspx title=Home><span>Home</span></a></li> Now I
I have below code behind in c# if (Session[cmpDictionaryTitle]!= null) { downloadLinks.Text += @<li><a
I have below code to insert a style into DOM (there is a use

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.