Fixed in Xcode 13.2 RC (13C90)
Post
Replies
Boosts
Views
Activity
FB9732898
Repost with corrections.
Try something like this:
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView { return NSVisualEffectView() }
func updateNSView(_ nsView: NSView, context: Context) { }
}
.background(VisualEffect())
For pure transparent try something like
class TransparentWindowView: NSView {
override func viewDidMoveToWindow() {
window?.backgroundColor = .clear
super.viewDidMoveToWindow()
}
}
struct TransparentWindow: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView { return TransparentWindowView() }
func updateNSView(_ nsView: NSView, context: Context) { }
}
.background(TransparentWindow())
Single channel inverted colour like red or blue?
What mac identifier, external display and colour profile?
Try changing your colour profile eg sRGB.
Try something like this:
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView { return NSVisualEffectView() }
}
.background(VisualEffect)
For pure transparent try something like
class TransparentWindowView: NSView {
override func viewDidMoveToWindow() {
window?.backgroundColor = .clear
super.viewDidMoveToWindow()
}
}
struct TransparentWIndow: NSViewRepresentable
func makeNSView(context: Self.Context) -> NSView { return TransparentWindowView() }
.background(TransparentWIndow)
Try using a custom working directory set to $(PROJECT_DIR) in the scheme run options.
If your tests don't use the run action's arguments and environment variables then you can still manually set the working directory by editing the scheme using a text editor (close Xcode first).
eg project.xcodeproj/xcshareddata/xcschemes/tests.xcscheme
<LaunchAction
buildConfiguration = "Debug"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "$(PROJECT_DIR)"
Duplicate of: https://developer.apple.com/forums/thread/693646 :-)