firebaseを使用して2つの認証レベルでiOSアプリケーションを実行しようとしています。 2番目の認証は、データベースにコード魔法使いが置かれているテキストフィールドに挿入して検証する必要があります。firebaseを使用してスワイプコードに検索フィールドを作成する方法は?
//
// AccessoTerzoLivello.swift
// amesci
//
// Created by Gianluca Caliendo on 07/07/17.
// Copyright © 2017 Amesci. All rights reserved.
//
import UIKit
import Firebase
class AccessoTerzoLivello: UIViewController {
@IBOutlet weak var CodiceVolontarioTxt: UITextField!
@IBAction func Accedi(_ sender: UIButton) {
var rootRef: DatabaseReference!
rootRef = Database.database().reference()
var conditionalRef = rootRef.child("SchedaVolontari")
conditionalRef.observe(.value) {(snap: DataSnapshot) in }
if self.CodiceVolontarioTxt.text = snap
}
else {
let alert = UIAlertController(title: "Errore", message: "Codice volontario non valido", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "ok", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
}
}
ようこそStackOverflow。 SOの[how-to-use](https://stackoverflow.com/help/how-to-ask)セクションをチェックし、質問を更新してください。これまでに試したことの詳細も記入してください。 –