Releases: SvenTiigi/STLocationRequest
Version 3.3.1
Version 3.3.0
Swift 4.2
Added Swift 4.2 compatibility
📺 tvOS Support
Added tvOS support
LocationSymbolIcon
This release dropped custom LocationSymbolIcon support
Version 3.2.2
Small bug fixes
Swift 4.1
FlyoverKit
FlyoverKit
The Engine of the STLocationRequestController
has been fully replaced with the newly released FlyoverKit.
Button Configuration
The configuration for the allow
and not-now
button has been expanded. You can now set the following properties to customize the buttons to your needs.
- title
- titleColor
- font
- backgroundColor
- highlightedBackgroundColor
- highlightedTitleColor
- borderColor
- borderWidth
- cornerRadius
Carthage Support
Carthage
With this release STLocationRequest
is also available via Carthage.
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate STLocationRequest into your Xcode project using Carthage, specify it in your Cartfile
:
github "SvenTiigi/STLocationRequest"
Run carthage update --platform iOS
to build the framework and drag the built STLocationRequest.framework
, SnapKit.framework
and SwiftIconFont.framwork
into your Xcode project.
On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase” and add the Framework paths (for all Frameworks) as mentioned in Carthage Getting started Step 4, 5 and 6
Configuration
The STLocationRequestController.Configuration
struct has been slightly modified in order to have a consistent access to specific variables.
config.titleText // No longer available
config.title.text = "Use this 🙌"
Bug Fixes
Version 3.0 Breaking Changes
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.Configuration
let 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.Events
locationRequestController.onEvent = { event in
if case .locationRequestAuthorized = event {
// Location Request Authorized 🙌
}
}
// Present STLocationRequestController
locationRequestController.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'
Major 2.0 Update
Version 2.0
STLocationRequest is now updated to version 2.0 🙌
- The most important part is the removed Storyboard, which was former used to layout the UI.
All UI layouting is now being done in code 👨💻. - STLocationRequestController has now even more properties to customize it 🤓
- Improved Objective-C support
- Improved Notch-Support for iPhone X