STLocationRequest v3.0.0 Release Notes
Release Date: 2018-01-29 // about 6 years ago-
๐ Version 3.0
๐จ The
STLocationRequestController
has been completely refactored and improved. The most important changes are the construction and configuration for anSTLocationRequestController
object as well as the newonEvent
closure property. The following usage code snippet will show how to migrate to the3.0
version.Usage
import STLocationRequest// Initialize STLocationRequestController with STLocationRequestController.Configurationlet locationRequestController = STLocationRequestController { config in config.titleText = "We need your location for some awesome features" config.allowButtonTitle = "Alright" config.notNowButtonTitle = "Not now" config.mapViewAlpha = 0.9 config.backgroundColor = UIColor.lightGray config.authorizeType = .requestWhenInUseAuthorization}// Get notified on STLocationRequestController.EventslocationRequestController.onEvent = { event inif case .locationRequestAuthorized = event { // Location Request Authorized ๐ } }// Present STLocationRequestControllerlocationRequestController.present(onViewController: self)
๐ Objective-C Support?
๐ The Objective-C support has been removed in this version to be compatible with the Swift coding standards. If you need to use the
STLocationRequestController
inside an Objective-C Project you should bind the Pod to the2.0
Version:pod 'STLocationRequest', '~\> 2.0'