我目前正在使用 Swift 开发一个 iOS 应用程序,我已经下载了 facebook sdk login 并且我也很熟悉它。另一方面,我需要制作自定义表格视图,所以我下载了 Eureka 框架来执行此操作。
我有一个表格,要求用户提供信息以注册一个新帐户,问题是我需要在表格视图顶部有一个 facebook 登录选项,但我还没有找到完成此操作的方法。由于 Eureka 表视图是以编程方式添加的,因此可以在情节提要中看到它,因此我需要找到一种方法并添加登录按钮。有谁知道如何做到这一点?谢谢
这是我的表格代码:
private func addLoginForm() {
self.form +++ Section()
<<< TextRow() { $0.placeholder = "Name"
$0.tag = "name"
}
+++ Section()
<<< TextRow() { $0.placeholder = "Email"
$0.tag = "email"
}
+++ Section()
<<< PhoneRow() {$0.placeholder = "Phone"
$0.tag = "phone"
}
+++ Section()
<<< PasswordRow() { $0.placeholder = "Password"
$0.tag = "password"
}
+++ Section()
<<< ButtonRow() {
$0.title = "Login"
$0.onCellSelection { cell, row in
self.evaluate()
}.cellSetup({ (cell, row) in
cell.backgroundColor = UIColor(red: 114.0/255, green: 3.0/255, blue: 194.0/255, alpha: 1.0)
cell.tintColor = UIColor.whiteColor()
row.cell.height = {
return 65
}
})
}
}