Post

Replies

Boosts

Views

Activity

How on earth do I get the actual dimensions of a presented modal view on iPad?
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
4
0
744
Jun ’24
Disabling tone mapping in iOS camera AVCaptureDevice
I'm trying to make an iOS app where the user can adjust the exposure manually (I'm using a single slider to adjust ISO and shutter speed at the same time). It mostly works fine, however when I adjust these values, I can tell iOS is doing an additional tone mapping step to try to equalize the pixel values, and it messes with the exposure (for example, really brightening up dark pixels when I might actually want them dark). I've tried everything I can see in the documentation to disable this extra tone mapping step, but none of these successfully disable it (I'm testing using an iPhone 8 with iOS 13.3.1). Any ideas what else I can do to disable this effect and get unmodified pixels?camera = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) if (camera.isLowLightBoostSupported) { camera.automaticallyEnablesLowLightBoostWhenAvailable = false; } if (camera.activeFormat.isGlobalToneMappingSupported) { camera.isGlobalToneMappingEnabled = false; } camera.automaticallyAdjustsVideoHDREnabled = false; if (camera.activeFormat.isVideoHDRSupported) { camera.isVideoHDREnabled = false; }
4
0
3.1k
Mar ’20
XCode 10 stopped detecting changes in C++ header files
I have a C++ project I've been working on fine in XCode 9, where when I edit a header file it automatically detects which object files need to be recompiled when I go to build/run the program. As of XCode 10.0 (10A255), however, when I make edits to my header files, XCode doesn't detect the changes and doesn't recompile anything when I try to build/run. So I have to clean the entire build folder and rebuild everything any time I make changes to a header file. Anyone else have this issue?
5
0
4.1k
Oct ’18