Post

Replies

Boosts

Views

Activity

Reply to Access persona on VisionOS
If you want to access Persona without using SharePlay or Group Activity, use AVFoundation. Get Front Camera Capture Device using AVCaptureDeviceDiscoverySession. Front Camera Capture Device will present Persona. Enterprise API is not required. Configure AVCaptureSession with Front Camera Capture Device and AVCaptureVideoDataOutput. Get Sample Buffers from AVCaptureVideoDataOutput. Render it using Metal (CAMetalLayer or Compositor Services), or UIImageView (easy, but not recommended).
4d
Reply to Image Playground API
You can use it right now. See the /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ImagePlayground.framework/Versions/A/Modules/ImagePlayground.swiftmodule/arm64e-apple-macos.swiftinterface file. Here's my sample project for iOS. https://github.com/pookjw/ImagePlaygroundExample
2w
Reply to Collapse button NavigationView SideBar SwiftUI
func setDisplayModeButtonVisibilityHidden() {     typealias BlockType = @convention(c) (Any, Selector, UISplitViewController.Style) -> Any     let selector: Selector = #selector(UISplitViewController.init(style:))     let method: Method = class_getInstanceMethod(NSClassFromString("SwiftUI.NotifyingMulticolumnSplitViewController"), selector)!     let originalImp: IMP = method_getImplementation(method)     let original: BlockType = unsafeBitCast(originalImp, to: BlockType.self)     let new: @convention(block) (Any, UISplitViewController.Style) -> Any = { (me, arg0) -> Any in         let object: UISplitViewController = original(me, selector, arg0) as! UISplitViewController         object.displayModeButtonVisibility = .never         return object     }     let newImp: IMP = imp_implementationWithBlock(new)     method_setImplementation(method, newImp) } ... on your @main App, @main struct YourApp: App {     init() {         setDisplayModeButtonVisibilityHidden()     } / ** / }
Apr ’22