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

  • Home
  • SEARCH
  • 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 7082519
In Process

The Archive Base Latest Questions

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

I have customized the camera with custom buttons(UIButton) by overlay view. My iPhone application

  • 0

I have customized the camera with custom buttons(UIButton) by overlay view. My iPhone application will run only in Landscape mode(Left and Right). Now, my camera overlay view change it’s orientation left and right perfectly in iPhone 3GS but not run clearly in iPhone4. In ios5 if i launch the camera with overlay view in landscapemode(Right/Left) it launching perfectly but, if i change the orientation to (Right -> Left / Left -> Right) the overlay view not changing perfectly the frame size of the UIView(CameraOverlayView),UIButton frame sizes are changing. How can i fix it? Please help me to fix this problem. I hope you my friends fix my problem. Thanks in advance. Here i have attached my code that i used.

  UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

if(orientation == UIDeviceOrientationLandscapeLeft)
{
    CGAffineTransform transform = self.view.transform;
    transform = CGAffineTransformRotate(transform, (M_PI / 2.0));
    imgpicker.cameraOverlayView.transform = transform;
    NSLog(@"Orientation Landscape Left");
} 
else if(orientation == UIDeviceOrientationLandscapeRight)
{
    imgpicker.cameraOverlayView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, 117.81);
    NSLog(@"Orientation Landscape Right");
}

This code works good in iPhone#GS(ios4) but not working good in iPhone4(ios5). Can anyone please help me to fix this problem?

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

    Thank you my friends. I have solved this issue by myself. I just set the bounds to UIView so it covers full view on Camera OverlayView and also i have tried above code that i mentioned in my question.

         cameraview.bounds = CGRectMake(0.0, 0.0, 480.0f, 320.0f); 
    

    And so i have checked this code at beginning of Camera launch,

    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;
        } 
    

    After this i was check this condition in UIDeviceOrientation Notification also. Now, my app working charm. Thanks.

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

Sidebar

Related Questions

I have an application that has a list of buttons and has customized tooltips.
I have customized the contextual menu for my Cocoa application such that only certain
I have customized UIButton with the following properties: 84x44 frame 84x44 background image 32*32
In OS 3.1, Apple provides a way to overlay custom controls on the camera
i have a website that will have customized designs, depending on what store was
I have a UITableViewController that has custom cells that I have customized with my
I need to create my own grid which will have customized paging and sorting.
Is there a way to save application configurations and settings that user have customized
I came across this application, that appeared to have customized the UI Picker. I
I have a custom list view which contains two text views and on button.

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.