Anyway to lock orientation to per se Portrait for only a specific form and not the whole application? Using Delphi xe6, for iOS. Can't seem to find anything by googling. Thank you!
Update:
My underlying issue is that I'm using a zbar unit for scanning and when the screen rotates, the display from the camera view does not. So the app goes to landscape, but the view from the scanner is still portrait, thus making the view look sideways. From what I've googled and tooled around on my own, it appears that locking the orientation maybe easier so here is where I am.
I've found this article: http://www.delphifeeds.com/go/s/84941, but to no avail, the one form I don't want to rotate, still rotates.
I've implemented this code for the time being, although I'm not very found of it. Was just a quick, fix work-around.. I put everything ontop of a layout and on the form's resize event:
with LayoutOrientation do
begin
if Clientwidth > ClientHeight then
begin
Align := TAlignLayout.None;
width := ClientHeight;
height := Clientwidth;
RotationAngle := 90;
RotationCenter.X := 0.948;
end else begin
RotationAngle := 0;
RotationCenter.X := 0.5;
Align := TAlignLayout.Client;
end;
end;
Meh, I don't like this because the app still repaints when it doesn't need to and also the status bar showing at the top still, gives it a funky look. This for the time being works - but really looks like I hacked it, which in this case I did..