iOS Question iPhone orientation lock

cwt

Active Member
Licensed User
Longtime User
Looked all over but could not find how to do this - how do I lock the device orientation for a single page to either landscape or portrait in B4i?
 

cwt

Active Member
Licensed User
Longtime User
I may be missing something here but I know how to use the Visual Designer - I have been using B4A for years and I know how to lock a window in Android to either landscape or potrait. But I cannot see how or where to do that in iOS. What am I missing?
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
are you speaking about

#iPhoneOrientations: Portrait
#iPadOrientations: Portrait

??
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Yes, I am referring to

#iPhoneOrientations: Portrait
#iPadOrientations: Portrait

But on a page-to-page basis, not globally. Is this possible?
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Semen,

I am using B4XPages and your code does not appear to work with this. Do you have a version for B4XPages in B4i ?
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
pageOrientation.bas, as it is, works with B4XPage, because finally all is based on UIViewController.

To find native Page is simple (B4XPages.GetNativeParent (Me)). But there is a small problem in which event to insert a call of pageOrientations.setInterfaceOrientations.
A correct place is to insert inside B4XPages.ShowPage, but to do this is necessary to reconstruct a library (not a good idea).
 
Upvote 0
Top