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

The Archive Base Latest Questions

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

In my iPhone application i have a UIImagePickerController for take photos. I have hide

  • 0

In my iPhone application i have a UIImagePickerController for take photos. I have hide all default camera controls and added UIView with Two button as a CameraOverLayView in UIImagePickerController. My application is always run in Landscape mode only. The Camera is also launching Landscape mode only. Now, the CameraOverlayView is only in Landscape Left side not change to Landscape to Right. How can i change the CameraOverlayView LandscapeMode Left and Right when the device orientation will changing? Please help me to fix it. It is major problem in my app. This code hold the Overlayview in Landscape mode Left

imgpicker.cameraOverlayView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, 117.81);

and this code hold the cameraoverlayview in Landscape mode right
GAffineTransform transform = self.view.transform;

    transform = CGAffineTransformRotate(transform, (M_PI / 2.0));

    imgpicker.cameraOverlayView.transform = transform;

I used these codes in UIInterfaceOrientation methods like this,

UIInterfaceOrientation orientation= [[UIApplication sharedApplication] statusBarOrientation];
    if (orientation == UIInterfaceOrientationLandscapeLeft) 
    {
        imgpicker.cameraOverlayView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, 117.81);
    }
    else if (orientation == UIInterfaceOrientationLandscapeRight)
    {
        CGAffineTransform transform = self.view.transform;
            transform = CGAffineTransformRotate(transform, (M_PI / 2.0));
        imgpicker.cameraOverlayView.transform = transform;
    }

But, these are not helping me. When i rotate the device orientation landscape left and right, the cameraoverlayview does not changing. Can you please fix my problem? Thanks.

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

    Thanks to all. I have solved the Camera OverlayView orientation problem by myself. I have used the same code mentioned in my question. Just i have added UIDeviceOrientation Notification for the orientation changes. Please find the code below,

    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];
    
    
    - (void) orientationChanged:(NSNotification *)notification
    {
        UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
    if(orientation == UIDeviceOrientationLandscapeLeft)
            {                  
                CGAffineTransform transform = self.view.transform;
                transform = CGAffineTransformRotate(transform, (M_PI/2.0));
                imgpicker.cameraOverlayView.transform = transform;
            } 
            else if(orientation == UIDeviceOrientationLandscapeRight) 
            {   
                imgpicker.cameraOverlayView.transform = CGAffineTransformRotate(CGAffineTransformIdentity,117.81);
            }  
    }
    

    I just added this method additionally in my code. So that when the user change the device orientation this method will call and change camera overlay view’s orientation. Please check your conditions inside this method otherwise app will getting crash. Thanks.

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

Sidebar

Related Questions

hai all, in my iphone application i have a login view with two text
I am new to use UIImagePickerController in iPhone applications. I have added two UIButtons
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I currently have an iPhone application with a tabbar and multiple viewcontrollers. All the
In my Iphone application i have .plist file in which i am putting all
I have created a new iPhone application.I have two mach machines. I have created
I have this iPhone application that let users take a picture and save it
In my iphone application i have added the Uitable view. While launching the application
I have an iPhone application using a UIImagePickerController . As sourceType I have UIImagePickerControllerSourceTypePhotoLibrary
I am using UIDatePicker in my iPhone application.I have kept a button on clicking

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.