【发布时间】:2018-04-27 10:02:39
【问题描述】:
我遇到了与 GMSPlacePickerViewController 相关的问题,我试图使用谷歌提供的 GMSPlacePickerViewController 多次选择位置。经过几次尝试,我将收到“网络连接丢失”的内存警告。警报。 所以任何人都知道我该如何解决这个问题。
提前致谢。
【问题讨论】:
标签: ios swift google-maps google-places-api
我遇到了与 GMSPlacePickerViewController 相关的问题,我试图使用谷歌提供的 GMSPlacePickerViewController 多次选择位置。经过几次尝试,我将收到“网络连接丢失”的内存警告。警报。 所以任何人都知道我该如何解决这个问题。
提前致谢。
【问题讨论】:
标签: ios swift google-maps google-places-api
请在 didReceiveMemoryWarning() 方法中输入此代码
override func didReceiveMemoryWarning()
{
super.didReceiveMemoryWarning()
URLCache.shared.removeAllCachedResponses()
URLCache.shared.diskCapacity = 0
URLCache.shared.memoryCapacity = 0
self.viewMap.clear()
self.viewMap.reloadInputViews()
}
【讨论】: