Post

Replies

Boosts

Views

Activity

How do I change the background color of a visionOS immersive space?
In visionOS, once an immersive space is opened, the background color is solid black. How do I change this? I just need to set a static color without any shading, but I can't find any documentation or examples on how to do this, and the template that comes with Xcode 15.1 beta 3 doesn't change the background color. I've searched around for information, but all I can find points back to MTKView.clearColor, which I can't use when drawing into an immersive space, since immersive spaces on visionOS use Compositor Services and not MTKView or CAMetalLayer for drawing 3D content.
2
0
1.1k
Dec ’23
Creating an immersive space using UIKit?
How do I create & open an immersive space window scene from a UIKit view or view controller? I need to create one in order to use Compositor Services in order to draw a 3D object using Metal, but this particular GUI is drawn & laid out using UIKit, and it isn't possible for me to rewrite it to use SwiftUI. I already tried [UIApplication.sharedApplication activateSceneSessionForRequest:[UISceneSessionActivationRequest requestWithRole:UISceneSessionRoleImmersiveSpaceApplication] errorHandler:...], but all that happened was it opened a new window for the main application scene (UIWindowSceneSessionRoleApplication), instead of opening an immersive space scene as I expected. Yes, I did create a scene manifest in my app's Info.plist, with a UIWindowSceneSessionRoleApplication scene, and a CPSceneSessionRoleImmersiveSpaceApplication scene. Surely there has to be a way to do this without resorting to SwiftUI...
2
0
823
Sep ’23
Changing the velocity of a UIPanGestureRecognizer?
I have a table view within a scroll view. The inner table view displays content, and the outer scroll view provides zooming for the table view's content. When the outer scroll view gets a pan gesture, I want it to scroll both views in response to a pan gesture, so I overrode -gesture:shouldRecognizeSimultaneouslyWithGestureRecognizer: to trigger both pan gesture recognizers at once, but now pans are moving twice as fast.How do I change the velocity so they are at half their current velocity? Right now, panning is happening twice as fast as it should be happening, and I'd like to fix that. I tried adjusting the translation using -setTranslation:inView:, which says it adjusts the velocity in the documentation, but it doesn't seem to actually do anything to the velocity...
3
0
1.5k
May ’20
MTLCopyAllDevicesWithObserver() returns an array of MTLCaptureDevice objects, but the observer returns MTLDebugDevice objects. How do I compare them?
I'm looking at Apple's Device Selection and Fallback for Graphics Rendering sample code. In that code, MTLCopyAllDevicesWithObserver() returns an array of MTLCaptureDevice objects. However, when a disconnect event is handled, the device sent to the observer is an MTLDebugDevice.How do I correctly compare an MTLDebugDevice with an MTLCaptureDevice? You would think that -isEqual: would return true if they pointed to the same device, but it doesn't. I'm using macOS 10.15.4.
1
0
828
Mar ’20
Xcode 11.4 beta requires Catalina?
I downloaded the latest Xcode 11.4 beta, but it won't run. It says it requires macOS 10.15.2.Please tell me that Apple is not dropping support for Mojave starting with Xcode 11.4, and that this was a temporary blip before compatibility is restored. I don't want to downgrade from Mojave to Catalina.
2
0
1.9k
Feb ’20
Enabling parts of System Integrity Protection while disabling specific parts?
Is there a way to disable certain parts of SIP while enabling parts of it? If so, then how do I do this?I'd like to enable most of SIP (such as filesystem protections), but disable debugging restrictions so that I can attach a debugger to System Preferences to debug a preference pane, something that is normally not allowed. I'm aware of csrutil, but there's no manual for the tool, and the online help doesn't say whether it can do this or not.
6
0
36k
Sep ’15