Preview:
@IBAction func saveChangesPressed(_ sender: UIButton) {
        
        let user = Auth.auth().currentUser
        if let user = user {
            let db = Firestore.firestore()
            let docRef = db.collection("Users").document(user.uid)
            docRef.updateData(["Name": self.nameField.text ?? "User","Email": self.emailField.text ?? "a@gmail.com", "MobileNumber": self.phoneNumberField.text ?? "123"])
        }
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter