Detecting orientation of iPhone using C++

  

Embarcadero C++Builder 10.3.2 Enterprise

Searching the internet, I could not find any FMX code for this. Based on Delphi code, this should have worked but the compiler does not like it

if (Application->FormFactor->Orientations == Fmx::Types::TScreenOrientations::Landscape) {
//Landscape
}

Also, the value of Application->FormFactor->Orientations is the same whatever the orientation of the iphone. {System::SetBase = {Data = {[0] = 11 ‘\v’}}}
How does one determine the orientation?

Comments are closed.