Learn iOS 11 Programming with Swift 4 Second Edition by Craig Clayton

Learn iOS 11 Programming with Swift 4 Second Edition by Craig Clayton

Author:Craig Clayton
Language: eng
Format: epub
Tags: COM051370 - COMPUTERS / Programming / Macintosh, COM051460 - COMPUTERS / Programming / Mobile Devices, COM051390 - COMPUTERS / Programming / Open Source
Publisher: Packt
Published: 2018-01-30T10:43:22+00:00


func currentRegion(latDelta:CLLocationDegrees, longDelta:CLLocationDegrees) -> MKCoordinateRegion {

Part B: This guard statement obtains the first item in the array. If there are no items in the array, it will just return an empty coordinate region. If there are items in the array, it will return the coordinate region:

guard let item = items.first else { return MKCoordinateRegion() }

Part C: Here, we are creating an MKCoordinate with the latitude and longitude that we passed into the function. MKCoordinateSpan defines a span, in the latitude and longitude directions, to show on the map:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.