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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:25:24+00:00 2026-06-18T12:25:24+00:00

I know this question has been asked before, but how can I support a

  • 0

I know this question has been asked before, but how can I support a different view depending on my interface orientation in iOS 5?

An example by Apple shows a PortraitViewController and a LandscapeViewController. The PortraitViewController creates the LandscapeViewController and registers itself for rotation notifications. When it receives a rotation notification it either pushes or pops the LandscapeViewController depending on current interface orientation.

So far so good.

But how can I keep data both controllers have synchronized? (They display the same data obviously, since they are technically the same controller to the user, just with different views in landscape and portrait). Both have a “reload data button” which reloads their data. How can I tell the PortraitViewController to show the same data when the LandscapeViewController reloads it and vice versa?

Another problem is with memory warnings. When the interface is in landscape mode and I receive a memory warning my PortraitViewController gets unloaded. Now if I reload the data for my LandscapeViewController the PortraitViewController cannot do the same, because it is unloaded and has its Outlets still set to nil.

How do I adress all of these issues?

  • 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-18T12:25:25+00:00Added an answer on June 18, 2026 at 12:25 pm

    So what I ended up doing is using one ViewController with 2 views which shows a different view depending on interface orientation. The downside of this is that I have to connect all outlets twice and manipulate them twice.

    But this way I can easily share my data and avoid one view being unloaded while the other isn’t.

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

Sidebar

Related Questions

Yes, I know this question has been asked before, but I can't find an
Alright, I know this question has been asked before, but mine has a different
I know this question has been asked before, but I tried eveything and can't
I know this question has been asked many times before but I can't find
I know this question has been asked on SO before, but I can't figure
I know this question has been asked before, but I can't seem to get
I know that maybe this question has been asked before, but I can't seem
I know this question has been asked before numorous times but they seem to
I know this question has been asked before, but non of the solutions solve
I know this question has been asked before, but I haven't been able to

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.