---
title: "#199: Beautiful Location Prompts with STLocationRequest 📍"
url: https://littlebitesofcocoa.com/199-beautiful-location-prompts-with-stlocationrequest
author: Jake Marsh
date: 2016-02-25
published: 2016-02-25
topics: ["Libraries","UIKit","Core Location"]
description: "iOS gives us a ton of great capabilities to build upon. Being able to use the user's current geographic location in our apps really has changed the world."
---

# #199: Beautiful Location Prompts with STLocationRequest 📍

By Jake Marsh, February 25, 2016. HTML: https://littlebitesofcocoa.com/199-beautiful-location-prompts-with-stlocationrequest

**iOS** gives us a ton of great capabilities to build upon. Being able to use the **user's** current geographic location in our **apps** really has changed the world.

We always need to ask for the **user's** permission first though, so we might as well do it in style! Today we'll check out a simple yet beautiful library from [Sven Tiigi](https://github.com/SvenTiigi) called [STLocationRequest](https://github.com/SvenTiigi/STLocationRequest) that uses [Flyover](http://flyovercities.com/) to provide a great looking "location access prompt" **view controller**.

<img src='https://media.littlebitesofcocoa.com/bite-assets/199-beautiful-location-prompts-with-stlocationrequest-examples.png' style='max-width: 443px;' />

We'll begin by importing _STLocationRequest_, and configuring and showing a **location request controller**.

``` swift
self.showLocationRequestController(
  setTitle: "Allow location access?", 
  setAllowButtonTitle: "Sure", 
  setNotNowButtonTitle: "Nope", 
  setMapViewAlphaValue: 0.7, 
  setBackgroundViewColor: .orangeColor()
)
```

Then, we can subscribe to the **NSNotifications** the library posts to know how the user responds.

More info about _STLocationRequest_ can be found at [git.io/stlocationrequest](http://git.io/stlocationrequest)
