I finally succeed by using apple configurator 2 to reset the mac, and then the account problem with icloud I just configured a standard account without icloud, and once installed I activated icloud....
Post
Replies
Boosts
Views
Activity
I tried the last solution, but the titlebar is opaque with this code:
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView { return NSVisualEffectView() }
func updateNSView(_ nsView: NSView, context: Context) { }
}
@main
struct MyApp: App {
var body: some Scene {
#if os(macOS)
WindowGroup {
ContentView()
.background(VisualEffect())
}
.windowStyle(.hiddenTitleBar)
#endif
}
}
Seems complicated to render the hidden title bar translucent
Ok thank You Mikeyh.
You resolved two things in one
I was .ignoresafearea() on the ContextView() so the bar was transparent but a small goofy part at the bottom, ( the size of a title bar) was background color but not translucent, weird!
You resolved this. Thanks
I still have one more surely stupid question: ok the background of the window is now transparent, but only when the window has been put to front and activated(if it looses focus the background color is the system background color and no more transparent)
Thank you for your time mikeyh
finally settled for this:
import SwiftUI
// Visual effect est la pour rendre le fond effet transparent
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView {
var test = NSVisualEffectView()
test.state = NSVisualEffectView.State.active // this is this state which says transparent all of the time
return test }
func updateNSView(_ nsView: NSView, context: Context) { }
}
better use let and not var for "test"
and Yes @mikeyh I finally read the documentation ;)
finally settled for this:
import SwiftUI
// Visual effect est la pour rendre le fond effet transparent
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView {
let test = NSVisualEffectView()
test.state = NSVisualEffectView.State.active // this is this state which says transparent all of the time
return test }
func updateNSView(_ nsView: NSView, context: Context) { }
}