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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:59:17+00:00 2026-06-15T22:59:17+00:00

For some reasons I restrict my app to work only on landscape mode, but

  • 0

For some reasons I restrict my app to work only on landscape mode, but strangely when I open iPod music library from my app, it will always jump out in portrait mode.

See the following code, I am confused whether it is system default behavior? How can I tell it to come out in landscape mode (keep consistent with other UI)? Thanks.

- (IBAction)getMusic:(id)sender {
    MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic];
    picker.delegate                     = self;
    picker.allowsPickingMultipleItems   = YES;
    picker.prompt                       = NSLocalizedString (@"Add songs to play",nil);

    [self presentModalViewController: picker animated: NO];
    [picker release];
}


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return UIInterfaceOrientationIsLandscape(interfaceOrientation);;
    } else {
        return YES;

    }
}
  • 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-06-15T22:59:19+00:00Added an answer on June 15, 2026 at 10:59 pm

    From the MPMediaPickerController Class reference:

    Notes: The MPMediaPickerController class supports portrait mode only.
    This class does support subclassing. The view hierarchy for this class
    is private; do not modify the view hierarchy.

    There are posts here and elsewhere that describe workaround, but I can’t vouch for them.

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

Sidebar

Related Questions

For some reasons this part where I fetch JSON data from following url will
For some reason I cannot get my results set to restrict products that only
For some reasons, we want to add a WEB-LOGIC configured work-manager into web-services.jar which
For some reasons we have situations when we have to set properties from a
For some reasons I can't use xml layout files. But I need to create
For some reasons, i'm using the method described here: Link It starts off from
Looking at some tutorials I have added the radio button but for some reasons
I'm trying to implement ping function in MonoTouch. for some reasons, Ping class from
For some reasons I evaluate the option to exchange data between my iOS-App and
For some reasons, SSIS is not avalialble. I read about OPENROWSET, but I will

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.