【发布时间】:2016-11-30 07:58:47
【问题描述】:
我正在尝试根据所选月份和年份查看查询:
我已经选择了声明的日期( //dateselectedStr = "2016-11" )
并且在线数据库中的存储日期包含 updatedAt 相同的 2016-11,我如何根据具有 .contain 搜索查询?这是我的足迹
query.order(byDescending: "updatedAt")
if PFUser.current() != nil {
query.whereKey(CARD_UPDATED_AT, contains: dateselectedStr)
query.findObjectsInBackground { (objects, error)-> Void in
if error == nil {
self.recipesArray = objects!
// Reload CollView
self.recipesCollView.reloadData()
let counter = (objects!.count)
print(counter)
self.title = "\(counter) JOB CARDS"
self.hideHUD()
// Hide/show the nothing found Label
if self.recipesArray.count == 0 { self.nothingFoundLabel.isHidden = false
} else { self.nothingFoundLabel.isHidden = true }
} else {
self.simpleAlert("\(error!.localizedDescription)")
self.hideHUD()
}}
【问题讨论】:
标签: ios swift parse-platform