iOS Question Example with 3 page does not work as expected

D

Deleted member 103

Guest
Hi,

My example with 3 page does not work as expected.
Page 1 and 2 should always be displayed in portrait mode and page 3 should always be displayed in landscape mode.
If you come back from page 2 then page 1 is displayed with a shift up.
1. What can I do to ensure that the 1 page is displayed correctly, not moved up?
2. What can I do to ensure that the 1 page is always displayed in portrait mode at every start?
 

Attachments

  • b4i_test.zip
    6.4 KB · Views: 132
  • b4i_01.png
    b4i_01.png
    17 KB · Views: 145
  • b4i_02.png
    b4i_02.png
    7.2 KB · Views: 165
  • b4i_03.png
    b4i_03.png
    15.8 KB · Views: 146
  • b4i_04.png
    b4i_04.png
    8 KB · Views: 140
  • b4i_05.png
    b4i_05.png
    17 KB · Views: 143

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. There is a mistake in your code. You are creating new pages each time that the page is shown.

2. Add Sleep(700) before you change the bar state or the orientation to let the transition animation complete. Note that you can use NavControl.ShowPage2 to disable the animation.

3. You shouldn't raise an event from UINavigationController.shouldAutoRotate. See the attached project for the correct way to implement it.
 

Attachments

  • PagesWithOrientationChange.zip
    6.5 KB · Views: 156
Upvote 0
Top