У меня есть старый проект, где он работает нормально. Теперь он просто застревает здесь. Метод boxPositionDidChange вызывается снова и снова.
extension PrimaryContentViewController: PulleyDrawerViewControllerDelegate {
func collapsedDrawerHeight(bottomSafeArea: CGFloat) -> CGFloat {
return 0.0
}
func partialRevealDrawerHeight(bottomSafeArea: CGFloat) -> CGFloat {
return 0.0
}
func supportedDrawerPositions() -> [PulleyPosition] {
return PulleyPosition.all
}
func drawerPositionDidChange(drawer: PulleyViewController, bottomSafeArea: CGFloat)
{
print(drawer.drawerPosition);
var centerPoint = self.mapView.compassView.center
centerPoint.x = 40
self.mapView.compassView.center = centerPoint
if self.Navview.frame.origin.y == self.view.frame.origin.y {
if drawer.drawerPosition != .closed{
drawer.setDrawerPosition(position: .closed, animated: false)
}
}
if(drawer.drawerPosition != .open){
print("inside primary view controller")
mapHelper.needToResizePointAnnotations(position: drawer.drawerPosition, mapView: self.mapView, layerView: layerView)
}
if drawer.drawerPosition == .collapsed && PoiDetailsFound == false{
temperatureLabelBottomConstraint.constant = 128.0 + temperatureLabelBottomDistance
MapLogoConstraint.constant = 128.0 + temperatureLabelBottomDistance
}
}
func drawerDisplayModeDidChange(drawer: PulleyViewController) {
}
}
Но когда я комментирую, что PulleyDrawerViewControllerDelegate
выдает эту ошибку:
"Task <B7FE5FC6-2491-4D3B-B5D2-55F7CFE29C8E>.<1> finished with error [-999] Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://events.mapbox.com/events/v2?access_token=sk.eyJ1IjoiYWRhcjIzNzgiLCJhIjoiY2s4ZWR1dGJxMTRteDNmbWo1eGZhbzBoNiJ9.iuMaQQAf_06q9q1PW*****, NSLocalizedDescription=cancelled, NSErrorFailingURLKey=https://events.mapbox.com/events/v2?access_token=sk.eyJ1IjoiYWRhcjIzNzgiLCJhIjoiY2s4ZWR1dGJxMTRteDNmbWo1eGZhbzBoNiJ9.iuMaQQAf_06q9q1PW*****}
2020-03-31 09:39:17.946068+0600 maps-ios[46666:725389] Task <B7FE5FC6-2491-4D3B-B5D2-55F7CFE29C8E>.<1> HTTP load failed, 0/0 bytes (error code: -999 [1:89])"