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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:54:53+00:00 2026-05-13T22:54:53+00:00

I have an app that uses the iPhone camera and puts an overlay over

  • 0

I have an app that uses the iPhone camera and puts an overlay over the camera. However it all works fine and i have managed to rotate the UIView to landscape but their is a 20px gap at the top of the view although i have set the positioning to (0,0,480,320).

starContainerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 480.0, 320.0)]     autorelease]; 
 UIImageView *overlayViewNew = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,480.0,320.0)];
 UIImage *OverlayImage = [[UIImage imageNamed:@"overlay.png"] autorelease];
 overlayViewNew.image = OverlayImage;
 [starContainerView addSubview:overlayViewNew];

So as you can see above I have set the UIView and set the UIIMageView and assigned a UIImage to that UIImageview and then added it to a subview of the view.

Here is the code I use to rotate the View.

- (void) accelerometer:(UIAccelerometer *)accelerometer
   didAccelerate:(UIAcceleration *)acceleration {
     if (fabsf(acceleration.x) > -1.0) {
       CGAffineTransform landscapeTransform =     CGAffineTransformMakeRotation(degreesToRadian(90));
       landscapeTransform = CGAffineTransformTranslate (landscapeTransform, +80.0, +100.0);
       [self.starContainerView setTransform:landscapeTransform];
     }
   }

I just cant seem to get it to fill that gap! Can i also say that no rocket science was involved whilst developing this but I still cant find the answer.

  • 1 1 Answer
  • 1 View
  • 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-13T22:54:54+00:00Added an answer on May 13, 2026 at 10:54 pm

    If was down to the following code. I played about with the figures below and this worked.

    CGAffineTransform landscapeTransform =     CGAffineTransformMakeRotation(degreesToRadian(90)); 
      landscapeTransform = CGAffineTransformTranslate (landscapeTransform, +80.0, +80.0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rails app that uses heavily js (over 1MB total). I'd like
I'm working on an iPhone App that uses the camera to take pictures, then
I have written an iPhone app that uses the iPhone's relative GPS location. I
I have an IPhone app that uses webservices to get data from a server.
I have an iPhone app that uses an action sheet but I can't work
I have an iPhone app that uses the json-framework . I moved some of
We have an app that uses network, compass, camera and telephony. It has been
I have an app that uses NASA live TV stream for the iphone/ipad which
I have an iphone app that uses table view as the interface. Each time
I have an iPhone app that uses a UINavigationController, some table views, and iAd.

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.