This file contains hidden or 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
infix operator ?! { } | |
func ?!<A>(v: A?, msg: String) -> A { | |
if let v = v { | |
return v | |
} else { | |
println(msg) | |
exit(1) | |
} | |
} |
This file contains hidden or 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
// Put this into an Xcode 12.0 multiplatform app | |
import SwiftUI | |
struct ContentView: View { | |
@State var text = "Hello!" | |
var body: some View { | |
VStack { | |
TextEditor(text: $text) |
OlderNewer