SHARE
TWEET

Untitled

a guest Jul 18th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct UsernameTextField : View {
  2.    
  3.     @Binding var username: String
  4.    
  5.     @Binding var editingMode: Bool
  6.    
  7.     var body: some View {
  8.         return TextField($username, placeholder: Text("Username"), onEditingChanged: {edit in
  9.             if edit == true
  10.                 {self.editingMode = true}
  11.             else
  12.                 {self.editingMode = false}
  13.            
  14.             })
  15.             .padding()
  16.             .background(lightGreyColor)
  17.             .cornerRadius(5.0)
  18.             .padding(.bottom, 20)
  19.     }
  20. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top