我想将我的模型对象数据源更改为firebase.我有一个文件作为UICollection视图的数据源,homeViewController.swift.homeViewController.swift是一个垂直排列的collectionViewCell,每个单元格都有自己的水平排列的collectionViewcell.
这是models.swift文件
import UIKit
import Firebase
class BusinessCategory: NSObject {
var name: String?
var featurebusiness: [SampleBusinesses]?
var type: String?
static func sampleBusinessCategories() -> [BusinessCategory] {
let FastfoodCategory = BusinessCategory()
FastfoodCategory.name = "Fast Food"
var topFastFood = [SampleBusinesses]()
let FastfoodApp = SampleBusinesses()
FastfoodApp.name = "Papa Johns"
FastfoodApp.imageName = "PJ"
topFastFood.append(FastfoodApp)
FastfoodCategory.featurebusiness = topFastFood
let MobilePhoneCategory = BusinessCategory()
MobilePhoneCategory.name = "Mobile Phones"
var topMobilePhoneProvider = [SampleBusinesses]()
//logic
let MobilePhoneApp = SampleBusinesses()
MobilePhoneApp.name = "Verizon"
MobilePhoneApp.imageName = "verizon"
topMobilePhoneProvider.append(MobilePhoneApp)
MobilePhoneCategory.featurebusiness = topMobilePhoneProvider
return …Run Code Online (Sandbox Code Playgroud) nsobject firebase uicollectionview swift firebase-realtime-database
我有一组UITextfield供用户注册。我的应用程序构建成功,但是每当我尝试在电子邮件文本字段中输入@时,它都会在下面显示消息,并导致无法注册用户,无法单击“注册”按钮。有人知道发生了什么吗?以及如何解决此问题?
2017-04-14 15:41:26.949699-0400 Oja[72824:36708711] 0x6080003484b0 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x6080003484b0> { count = 1, transaction: 0, voucher = 0x0, contents =
"Result" => <int64: 0x608000222e40>: 29
}
2017-04-14 15:41:26.951188-0400 Oja[72824:36708711] 0x600000150e30 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x600000150e30> { count = 2, transaction: 0, voucher = 0x0, contents =
"Dictionary" => <dictionary: 0x600000345800> { count = 1, transaction: 0, voucher = 0x0, contents =
"ServerURL" => <dictionary: 0x600000344db0> { count = 3, transaction: 0, voucher = 0x0, contents …Run Code Online (Sandbox Code Playgroud)