func didReceiveResponse(response:QNearbyPlacesResponse?) -> Void {
self.response = response
if response?.status == "OK" {
if let p = response?.places {
places.append(contentsOf: p)
}
self.collectionView?.reloadData()
} else {
let alert = UIAlertController.init(title: "Error", message: "Unable to fetch nearby places", preferredStyle: .alert)
alert.addAction(UIAlertAction.init(title: "Cancel", style: .cancel, handler: nil))
alert.addAction(UIAlertAction.init(title: "Retry", style: .default, handler: { (action) in
self.loadPlaces(true)
}))
present(alert, animated: true, completion: nil)
}
isLoading = false
}
我收到消息"无法取得附近的地方" ,在控制台中查看我看到的警告:"尝试呈现已经呈现的UIAlertController(null)"。这是不能正确运行应用程序的问题吗?我怎么能解决它? (我已经看过这个警告,但找不到有用的东西)