-
-
Save zontan/e53dfe8c10725dea2c1345be4611aab8 to your computer and use it in GitHub Desktop.
This file contains 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
import UIKit | |
import Firebase | |
protocol JoinFriendViewControllerDelegate: NSObject { | |
func didJoinFriend(uid: String) | |
} | |
class JoinFriendViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { | |
@IBOutlet weak var tableView: UITableView! | |
var userRef: DatabaseReference! | |
var friendsRef: DatabaseReference! | |
var resultsArray = [String]() | |
var handle: AuthStateDidChangeListenerHandle? | |
var currentUser: User? | |
weak var delegate: JoinFriendViewControllerDelegate? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. | |
userRef = Database.database().reference(withPath: "users") | |
friendsRef = Database.database().reference(withPath: "friends") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment