This is the stupidest thing that should be so easy. I simply present a view controller using:
[self presentViewController:settingsView animated:YES completion:^(){
}];
Then in the code for the view controller being presented, I want to know it's width, which should be stupidly simple using:
const int viewWidth = self.view.frame.size.width;
HOWEVER, this gives me a value that is the same as the parent view's width, yet on iPad at least this view is visibly smaller than the parent/presenting view (as it is hovering over it with the view visible around the edges behind it). I have tried every stupid thing I can find within the parent view and view controller code that mentions margins and insets and whatnot, but nothing seems to give me the actual stupid value of the stupid presented view's visible dimensions! Any ideas? The iPad is on iPadOS 15.3.1, might try installing a newer version and see if this is some bug in this particular version of the OS.
Topic:
UI Frameworks
SubTopic:
UIKit