---
title: "#176: Beautiful Onboarding Walkthroughs with Gecco 🚶"
url: https://littlebitesofcocoa.com/176-beautiful-onboarding-walkthroughs-with-gecco
author: Jake Marsh
published: 2016-01-25
topics: ["Libraries","UIKit"]
description: "When a user first installs one of our apps, it'd be nice if we could hold their hand a bit, pointing out where the important bits are."
---

# #176: Beautiful Onboarding Walkthroughs with Gecco 🚶

By Jake Marsh, January 25, 2016. HTML: https://littlebitesofcocoa.com/176-beautiful-onboarding-walkthroughs-with-gecco

<img src="https://media.littlebitesofcocoa.com/bite-assets/176-beautiful-onboarding-walkthroughs-with-gecco-gif.gif" style="float: right; margin-left: 20px; margin-right: 20px;" />

When a user first installs one of our **apps**, it'd be nice if we could hold their hand a bit, pointing out where the important bits are.

Today we'll look at [Gecco](https://github.com/yukiasai/Gecco), a library that can make creating these walkthroughs quite easy. Let's dive in.

[Gecco](https://github.com/yukiasai/Gecco) is built using **UIKit's** custom **transition protocols**.

This means there's simply a **view controller** that we'll configure and present over our content that will display the "spotlight" effect.

In it's most basic form, we can use [Gecco](https://github.com/yukiasai/Gecco) by creating a _SpotlightViewController_, then configuring it's spotlight property to be one of the supplied `Oval`, `Rect`, or `RoundRect` **enum cases**:

``` swift
let spotlightVC = SpotlightViewController()

spotlightVC.spotlight = .Oval(
  center: CGPointMake(100, 100),
  width: 100)

presentViewController(spotlightVC, animated: true, completion: nil)
```

Then we simply present it like normal, neat! In simple cases this is all we need, next we'll look at customizing things further.

We can actually subclass [Gecco's](https://github.com/yukiasai/Gecco) _SpotlightViewController_ and use it's `spotlightView` **property** to animate the spotlight effect calling out different shapes, even morphing from one to another:

``` swift
class CustomSpotlightViewController : SpotlightViewController {
  var currentStep = 0
  func updateSpotlightView() {
    switch currentStep {
      case 0: spotlight = .Oval(center: CGPointMake(349, 42), width: 50)
      case 1: spotlightView.move(.Oval(center: CGPointMake(300, 42), width: 50))
      case 2: spotlightView.move(.RoundedRect(center: CGPointMake(375 / 2, 42), size: CGSizeMake(120, 40), radius: 6), moveType: .Disappear)
      case 3: dismissViewControllerAnimated(true, completion: nil)
      default: break
    }

    currentStep++
  }
}

```

**Note about hard-coding values:** We've used exact values here to make it easy to understand how [Gecco](https://github.com/yukiasai/Gecco) works. In a real world scenario, you would probably be grabbing these values from your views after they've been through a layout pass.

More info about _Gecco_ can be found at [git.io/gecco](http:/git.io/gecco)
