29,049
社区成员




var dataRows = [NSDictionary]()
// MARK: - View lifecycle
override func loadView()
{
super.loadView()
self.title = "All Customers of Me"
//Here we use a query that should work on either Force.com or Database.com
let request = SFRestAPI.sharedInstance().requestForQuery("SELECT Id, Name, Type FROM Account");
self.log(.Debug, msg: "Query: #records:")
SFRestAPI.sharedInstance().send(request, delegate: self);
}
// MARK: - SFRestAPIDelegate
func request(request: SFRestRequest!, didLoadResponse jsonResponse: AnyObject!)
{
self.dataRows = jsonResponse["records"] as! [NSDictionary] //报错行
self.log(.Debug, msg: "request:didLoadResponse: #records: \(self.dataRows.count)")
dispatch_async(dispatch_get_main_queue(), {
self.tableView.reloadData()
})
}