So in updating to Xcode 10 and Swift 4.2, of course I had to make a lot of changes in my project to update the syntax. I was able to rectify all issues except for one. I'm getting an error that says: 'MKMapRectIsNull' has been replaced by property 'MKMapRect.isNull'. I did the obvious thing of trying replacing MKMapRectIsNull with MKMapRect.isNull, but that generates another error which says: Instance member 'isNull' cannot be used on type 'MKMapRect'. Here's some more context:
var zoomRect = MKMapRect.null
for annotation in map.annotations {
let annotationPoint = MKMapPoint(annotation.coordinate)
let pointRect = MKMapRect(x: annotationPoint.x, y: annotationPoint.y, width: 0, height: 0)
if (MKMapRect.isNull(zoomRect)) {
zoomRect = pointRect
} else {
zoomRect = zoomRect.union(pointRect)
}
}
map.setVisibleMapRect(zoomRect, edgePadding: UIEdgeInsets(top: 40, left: 40, bottom: 40, right: 40), animated: true)
Any ideas/help would be appreciated.