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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:55:56+00:00 2026-05-18T00:55:56+00:00

i want to take screenshots in landscape mode. currently my below code takes screenshots

  • 0

i want to take screenshots in landscape mode.

currently my below code takes screenshots in PORTRAIT mode.

also i want to store the images into the given location not in photo library..

how can i attain this…

thanks for any help

below is my code

UIGraphicsBeginImageContext(self.view.bounds.size) ;
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, self, nil, nil); 
  • 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-18T00:55:57+00:00Added an answer on May 18, 2026 at 12:55 am

    As far as I know there is no way to take screenshots in landscape mode. Images taken with the iPhone contain an information called imageOrientation which is then used to rotate an UIImageView displaying that image.

    But you should be able to take an image in portrait mode and rotate it by 90 degree before saving it. I can’t try it right now but the following should work:

    Create a method for rotation and pass the UIImage as an argument.

    CGSize size =  sizeOfImage;
     UIGraphicsBeginImageContext(size);
    
     CGContextRotateCTM(ctx, angleInRadians); // (M_PI/2) or (3M_PI/2) depending on left/right rotation
    
     CGContextDrawImage(UIGraphicsGetCurrentContext(),
      CGRectMake(0,0,size.width, size.height),
      image);
    
     UIImage *copy = UIGraphicsGetImageFromCurrentImageContext();
    
     UIGraphicsEndImageContext();
    
     return copy;
    

    To store into a given location you can use NSData as I have answered on your other question ( Saving images to a given location )

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

Sidebar

Related Questions

I want to take html, including the text and images and turn it into
I want to take screenshots of the iPhone app view and save the images
I'm currently developing a game for Android and I want to take screenshots of
I want to take retina iPad screenshots using the simulator, but because it's bigger
I want to take screenshot programatically. So that i write code for it like,
I want to take automated screenshots of a running emulator, e.g. every 10 seconds
I want to use vba to take a screenshot (which will then be sent
I want to take multiple integer inputs in same line eg :- input -1
I want to take advantage of the new features in Windows 7 using C#
I want to take an array and use that array's values to populate an

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.