Releases: SvenTiigi/STLocationRequest
iPhone X
Custom Places
From now on you can add your own custom places to the STLocationRequestController
Example
// Add place via latitude and longitude
locationRequestController.addPlace(latitude: 51.960665, longitude: 7.626135)
// Add place via CLLocationCoordinate2D
let myCoordinate = CLLocationCoordinate2DMake(51.960665, 7.626135)
locationRequestController.addPlace(coordinate: myCoordinate)
Only show custom places
If you wish to show only your custom places just set the placesFilter
to .customPlaces
// Only your custom places will be shown
locationRequestController.placesFilter = [.customPlaces]
Satellite Flyover
Please keep in mind to check if your location is available in 3D-Flyover mode. To check just go to Apple Maps App and search your location and tap on the 3D-Button
Your place is awesome?
If you found an awesome place that should be default implemented to the STLocationRequestController
then just contribute it via a pull request. 👍
Updated Pod
Updated STLocationRequest Pod to Version 1.3.6
Added Swift-Version File
Added .swift-version file along the new cocoapod release
General Improvements
General Improvements
Updated Code to Swift Design Guidelines. And optimized code.
Font-Awesome-Swift
Updated Dependency to Version 1.6.1
Present CompletionBlock
From now on you can specify an optional completion block when you call the present
method
locationRequestController.present(onViewController: self) {
// Do awesome stuff here
}
Places-Filter and more Awesome-Places
Places-Filter
From now on you can specify which awesome places should been displayed. The optional attribute placesFilter
can be filled with an array of STAwesomePlace enums.
If you wish to show all awesome places, you leave the attribute placesFilter
nil.
// Only San Francisco Golden Gate Bridge and the Colosseum in Rome will be shown
locationRequestController.placesFilter = [.sanFranciscoGoldenGateBridge, .romeColosseum]
The default value is nil
More Awesome-Places
- Luxor Resort Las Vegas
- Apple Headquarter
- Muenster castle
- Piazza Di Trevi Rome
Swift 3 Support
In this release STLocationRequest is fully supporting Swift 3
Standard Naming Convention
In this release we standardize the naming convention for the STLocationRequest repository.
The STLocationRequest repository holds the STLocationRequestController so we have changed a lot of code that will also effect your existing code which is connected to the STLocationRequestController. We removed the Class STLocationRequest which was used to set the attributes like titleText, delegate, etc. and the initialization for the Storyboard File.
From now on you initialize the STLocationRequestController like this:
let locationRequestController = STLocationRequestController.getInstance()
To present the STLocationRequestController we make it more clear and changed it to:
locationRequestController.present(onViewController: self)
The STLocationRequestController.getInstance()
Method take care of the initialization of the Storyboard File. If you initialize STLocationRequestController by a standard Object initialization
let locationRequestController = STLocationRequestController() // use .getInstance()
and present the ViewController you will get be notified by a console output:
WARNING: Please initialize the STLocationRequestController via "STLocationRequestController.getInstance()" otherwise the Storyboard File can't be loaded from the Pod"
Other naming convention changes
OLD_NAME => NEW_NAME
- STLocationRequestDelegate => STLocationRequestControllerDelegate
- The attribute mapViewAlphaValue => mapViewAlpha
- STLocationAuthorizeType => STLocationRequestControllerAuthorizeType
- STLocationRequestEvent => STLocationRequestControllerEvent
More Citys and more customizing
In this release we added some bug fixes and added more places like Miami Beach, Central Park, GooglePlex Building, Laguna Beach and Le Moint Saint-Michel.
Furthermore we added two more customizing options
// Set the location symbol icon which will be displayed in the middle of the STLocationRequest-Controller.
// The devault value is FALocationArrow. You can browse at http://fontawesome.io/icons/ or
// https://github.com/Vaberer/Font-Awesome-Swift for other icons but be aware to use a icon
// which is in the context of a location request.
locationRequest.locationSymbolIcon = FAType.FALocationArrow
// Set the in the interval for switching the shown places in seconds. Default value is 15 seconds
locationRequest.timeTillPlaceSwitchesInSeconds = 15.0
More Customizing
In this release we have added more options for you to customize the STLocationRequest
-Controller for your purpose of usage.
/// Defines if the pulse Effect which will displayed under the location symbol should be enabled or disabled. Default Value: true
public var pulseEffectEnabled = true
/// The color for the pulse effect behind the location symbol. Default value: white
public var pulseEffectColor = UIColor.whiteColor()
// The color of the location symbol which will be presented in the middle of the location request screen. Default value: white
public var locationSymbolColor = UIColor.whiteColor()
// Defines if the location symbol which will be presented in the middle of the location request screen is hidden. Default value: false
public var locationSymbolHidden = false
Furthermore we added a new STLocationRequestEvent enum LocationRequestDidDisappear
which will be called in the delegate function locationRequestControllerDidChange
when the STLocationRequest
-Controller did disappear.
case .LocationRequestDidDisappear:
break