Avatar
I’m experimenting with callAsFunction and noticed something about initializer parentheses: struct Tester { func callAsFunction(with block: () -> Void) -> Int { 5 } } let result = Tester { } // This compiles and runs: 5 At first glance, it feels like the initializer isn’t explicitly called — I’d expect Tester() before the trailing c...
3:21 AM
3つめは自分もバグっぽく思ったのですが、SwiftUI.Layoutがその挙動を使っているみたいです BasicVStack { Text("A Subview") Text("Another Subview") } https://developer.apple.com/documentation/swiftui/layout
A type that defines the geometry of a collection of views.