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 an STLocationRequestController object as well as the new onEvent closure property. The following usage code snippet will show how to migrate to the 3.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 the 2.0 Version:

    pod 'STLocationRequest', '~\> 2.0'