This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
// Animates nicely since the type of both returns are the same, i.e. AnyView<Text> | |
func gimme(toggle: Bool) -> AnyView { | |
if toggle { | |
return AnyView( | |
Text("Hello World") | |
) | |
} else { | |
return AnyView( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct Cursor: Equatable { | |
let ns: NSCursor? | |
let id: String | |
} | |
struct CursorPreference: PreferenceKey { |
OlderNewer