iPad Layout Restrictions - how to

Greetings,

It seems that its kind of confusing this iOS part and i said its better to ask the forum for better details.

So i want to build like a form filling app. The idea was to have some views as single page, some views as split and some views as tab based.

Now as far as i see and while testing , it seems that what you set in the screen it stays like that for the cycle of the app.

The idea was to have :

Intro view as single view
Login / Register as tabbed screen so one view for Login and one view for registering, i guess those i can merge them into one with push part.

The most important for those to is that they have to be locked in Portrait mode home button down.

Categories views should be tab based , total of 6 and as well locked as Portrait with home button down. Now here i have another issue, i need the first Tab on the bottom to be a Logout button so when i press on that tab to log out the user. Is there a way to do that ? so far i did not found anything and if i put the code in the activate windows does not work.

Each category (tabbed screen type) has some options and on certain parts has to be switched to Split view screen so i do the basic filling and once i`m done i should be able to have on the left the needed list, i select the list the right view gets populated. This part can be Landscape as well, but only the split view type.

The question is , i can have something like this in XOJO or not ? as i don`t want to waste more time with this, so far i did some tests but unfortunately does not work.

Thanks in advance for your help.

You can add additional screens (in addition to the default iPhoneScreen and iPadScreen) to your project. You can then switch these screens to display at run-time by using the iOSApplication.CurrentScreen property like this:

Dim s As New MySpecialScreen App.CurrentScreen.Content = s.Content
When you do this the screen is immediately replaced. This should let you design whatever layouts you want and swap them in as needed.

To lock screens to portrait-only, just make sure “Portrait (Home on Bottom)” is the only Supported Orientation turned ON for the screen.

http://developer.xojo.com/userguide/ios-screens

Actually the supported orientations is locked to first screen that is displayed in the App: App default iphone/ipad screen.

If you create two screens, one with Portrait only, the second with Landscape only, when switching from one screen to another, the app is locked in the first orientation settings.

If the app needs several orientations (Portrait only for Login, and all orientations for other views), I would recommend allowing all orientations.
Then design the Login views as iOSContainerControls and display them in a View that contains a ScrollableArea. This way the user can still navigate through the entire login view even in landscape mode.

[quote=336435:@JrmieLeroy]Actually the supported orientations is locked to first screen that is displayed in the App: App default iphone/ipad screen.

If you create two screens, one with Portrait only, the second with Landscape only, when switching from one screen to another, the app is locked in the first orientation settings.

If the app needs several orientations (Portrait only for Login, and all orientations for other views), I would recommend allowing all orientations.
Then design the Login views as iOSContainerControls and display them in a View that contains a ScrollableArea. This way the user can still navigate through the entire login view even in landscape mode.[/quote]
Hello Jrmie,

Thanks for the info, that was my next question as it happened to me that the app does not switch, so the idea was to have it flexible enough but it seems that so far it does not do the job so i have to do as you said.

[quote=336322:@Paul Lefebvre]You can add additional screens (in addition to the default iPhoneScreen and iPadScreen) to your project. You can then switch these screens to display at run-time by using the iOSApplication.CurrentScreen property like this:

Dim s As New MySpecialScreen App.CurrentScreen.Content = s.Content
When you do this the screen is immediately replaced. This should let you design whatever layouts you want and swap them in as needed.

To lock screens to portrait-only, just make sure “Portrait (Home on Bottom)” is the only Supported Orientation turned ON for the screen.

http://developer.xojo.com/userguide/ios-screens[/quote]
Thanks Paul,

So far that was the way i did it but it seems that i have some small issues and have no idea how to fix it , maybe some help will be more than welcomed.

So , as a work screen i have a tabbed screen, the problem is that every time i load that tab it starts in the first tab, which i want to control as the first tab is set as Logout tab, so imagine you start the app you get logout directly, you switch screens, you get logout.

Is there any way to control the Tab on loading time? and if yes, then how i can doit ?

Second , how do i control the tab press? if i press a tab i need to control what it does, in the case of logout it should log out the user, or else i should put a blank page with some confirmation controls and if they press yes then to logout, otherwise switch it to the last viewed tab, but i need to know how i can control tabs from code side.

Thanks again.

This should help: https://forum.xojo.com/18750-programmatically-select-a-tabbar-tab

Thanks Jrmie,

Other option would be to have a screen as split and to put all the buttons on the bottom and to push the views as needed, in this way i get rid of the headache of having 6 screens for nothing , one and anyway they will only use a view a time so no need to complicate all to much .

I guess in a way that it will be even more ok as long as it respects the apple rules.

I`ll see and decide what to do.

Thanks again .