I’m utilizing body’s width for doing a little mathematical calculations. Body’s width studies as anticipated on Portrait, however when i modify to panorama, it nonetheless studies the outdated worth (what it was in portrait mode). Now if i modify my orientation again to portrait it studies the dimensions it was in panorama.This is is what i’m utilizing to get body’s width
let frameWithMaxWidth = CGSize(width: body.measurement.width, peak: .greatestFiniteMagnitude)
This is what my console print’s orientation and width as
Orientation: Portrait, width: 358.0
Orientation: Panorama, width: 358.0
Orientation: Portrait, width: 718.0
Is there a greater technique to get body’s width.