Post

Replies

Boosts

Views

Activity

Reply to visionOS: ornament and resize window
Related issue: Unable to set initial/default window size WindowGroup { ContentView() .frame(width: 300, height: 400) // imperfect, the ornaments still layout as the original size } .windowStyle(.plain) .defaultSize(width: 1.5, height: 2, depth: 0, in: .meters) // no effect on plain window
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’23
Reply to watchOS 9.2 breaks the complicationForeground() modifier
@ViewBuilder func complicationLayer(_ layer: Compatibility.ComplicationLayer) -> some View { if #available(watchOS 9.2, *) { switch layer { case .foreground: self case .background: self.complicationForeground() } } else { switch layer { case .foreground: self.complicationForeground() case .background: self } } } It's ugly but it works. I don't want Apple to reverse its semantics again, even if it's wrong. So be it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’22
Reply to Need a help
Reading other people's code can be very helpful, especially for real-world projects. Recommended: https://github.com/skjiisa/Tickmate-iOS
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to visionOS: ornament and resize window
Related issue: Unable to set initial/default window size WindowGroup { ContentView() .frame(width: 300, height: 400) // imperfect, the ornaments still layout as the original size } .windowStyle(.plain) .defaultSize(width: 1.5, height: 2, depth: 0, in: .meters) // no effect on plain window
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to watchOS 9.2 breaks the complicationForeground() modifier
@ViewBuilder func complicationLayer(_ layer: Compatibility.ComplicationLayer) -> some View { if #available(watchOS 9.2, *) { switch layer { case .foreground: self case .background: self.complicationForeground() } } else { switch layer { case .foreground: self.complicationForeground() case .background: self } } } It's ugly but it works. I don't want Apple to reverse its semantics again, even if it's wrong. So be it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to watchOS 9.2 breaks the complicationForeground() modifier
This issue can only be reproduced on the physical watch with watchOS 9.2 at this time. There is currently no simulator available for watchOS 9.2 in Xcode 14.2. Also, It is worth mentioning that the SwiftUI Preview also does not correctly render the replicationForeground() effect. But this should be another bug.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22