I'm new to iPad development so please bear with me. I have an iPad application that has a single XIB file. Within the XIB I have two views, one in portrait and one in landscape.
I have a simple button and text field on both views.
I created a single method to update the textfield to HelloWorld.
On my portrait view I have wired up the textfield and button in FileOwner.
When I run the application in portrait view I can tap the button and HelloWorld appears in the text box.
If I rotate the device in the simulator, the new landscape view appears but the textbox is empty.
So I have a few questions about this approach:
- When developing views for landscape and portrait is the correct way creating just one XIB and having both Views in there and then programatically switching to them?
- If it is correct to this this, how can I synchronize the data between both views when the device is rotated?