SHARE
TWEET

Untitled

a guest Jun 20th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct StateFromOutside: View {
  2.     let list = [
  3.         "a": "Letter A",
  4.         "b": "Letter B",
  5.         // ...
  6.     ]
  7.     @State var fullText: String = ""
  8.  
  9.     init(letter: String) {
  10.         self.fullText = list[letter]!
  11.     }
  12.  
  13.     var body: some View {
  14.         TextField($fullText)
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top