STLocationRequestController

public class STLocationRequestController : UIViewController

STLocationRequest is a UIViewController-Extension which is used to request the User-Location, at the very first time, in a simple and elegent way. It shows a beautiful 3D 360 degree Flyover-MapView which shows 14 random citys or landmarks.

  • Evaluates if locationServices are enabled and authorizationStatus is notDetermined

    Declaration

    Swift

    public static var shouldPresentLocationRequestController: Bool { get }
  • The optional onEvent closure to be notified if an STLocationRequestController.Event occured

    Declaration

    Swift

    public var onEvent: ((STLocationRequestController.Event) -> Void)?
  • The preferredStatusBarStyle

    Declaration

    Swift

    public override var preferredStatusBarStyle: UIStatusBarStyle { get }
  • The configuration

    Declaration

    Swift

    private var configuration: Configuration
  • The PlaceChanger

    Declaration

    Swift

    private lazy var placeChanger: STLocationRequestController.PlaceChanger { get set }
  • The Allow-Button

    Declaration

    Swift

    private lazy var allowButton: STLocationRequestController.Button { get set }
  • The Not-Now-Button

    Declaration

    Swift

    private lazy var notNowButton: STLocationRequestController.Button { get set }
  • The FlyoverMapView

    Declaration

    Swift

    private lazy var flyoverMapView: FlyoverMapView { get set }
  • TitleLabel

    Declaration

    Swift

    private lazy var titleLabel: UILabel { get set }
  • Location Symbol Label

    Declaration

    Swift

    private lazy var locationSymbolLabel: UIImageView { get set }
  • The pulse effect

    Declaration

    Swift

    private lazy var pulseEffect: LFTPulseAnimation { get set }
  • CLLocationManager

    Declaration

    Swift

    private lazy var locationManager: CLLocationManager { get set }
  • Designated initializer with Configuration object

    Declaration

    Swift

    public init(configuration: Configuration)

    Parameters

    configuration

    The configuration

  • Convenience initializer with Configuration Closure

    Declaration

    Swift

    public convenience init(configuration: (inout Configuration) -> Void)

    Parameters

    configuration

    The Configuration Closure

  • This initializer is not supported and will return nil Please use the configuration initializers

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)
  • Deinit

    Declaration

    Swift

    deinit
  • ViewDidLoad

    Declaration

    Swift

    override public func viewDidLoad()
  • ViewDidLayoutSubviews

    Declaration

    Swift

    public override func viewDidLayoutSubviews()
  • ViewWillTransition toSize

    Declaration

    Swift

    override public func viewWillTransition(to size: CGSize,
                                            with coordinator: UIViewControllerTransitionCoordinator)
  • Add Constraints

    Declaration

    Swift

    private func addConstraints()
  • Enum to decide which location request type should be used

    See more

    Declaration

    Swift

    enum Authorization : String, Codable, Equatable, Hashable, CaseIterable
  • Custom UIButton for STLocationRequestController

    See more

    Declaration

    Swift

    class Button : UIButton
  • The STLocationRequestController Configurations

    See more

    Declaration

    Swift

    struct Configuration
  • Present the STLocationRequestController modally on a given UIViewController. Please keep in mind that the 3D Flyover-View will only work on a real iOS Device not in the Simulator.

    Declaration

    Swift

    func present(onViewController viewController: UIViewController, completion: (() -> Void)? = nil)

    Parameters

    viewController

    The ViewController which will be used to present the STLocationRequestController modally.

    completion

    When the STLocationRequestController has been presented

  • Dismiss the STLocationRequestController

    Declaration

    Swift

    func dismiss(completion: (() -> Void)? = nil)
  • Allow button was touched request authorization by AuthorizeType

    Declaration

    Swift

    @objc
    func allowButtonTouched()
  • Not now button was touched dismiss Viewcontroller

    Declaration

    Swift

    @objc
    func notNowButtonTouched()
  • LocationManager didChangeAuthorizationStatus

    Declaration

    Swift

    public func locationManager(_ manager: CLLocationManager,
                                didChangeAuthorization status: CLAuthorizationStatus)
  • STLocationRequestEvent Enum for events in the delegate Method locationRequestControllerDidChange

    See more

    Declaration

    Swift

    enum Event : String, Codable, Equatable, Hashable, CaseIterable
  • The STLocationRequestController.Place

    See more

    Declaration

    Swift

    enum Place : Equatable, Hashable, CaseIterable
  • ChangePlace function typealias

    Declaration

    Swift

    typealias ChangePlace = (CLLocationCoordinate2D) -> Void
  • The PlaceChanger

    See more

    Declaration

    Swift

    class PlaceChanger