---
title: "#154: Return of the UIKit B-sides! 📼"
url: https://littlebitesofcocoa.com/154-return-of-the-uikit-b-sides
author: Jake Marsh
date: 2015-12-24
published: 2015-12-24
topics: ["UIKit","B-sides"]
description: "Today we're continuing our look at lesser-known UIKit features. Let's get started: Ever been testing an app and have an unwanted \"Undo\" prompt appear?"
---

# #154: Return of the UIKit B-sides! 📼

By Jake Marsh, December 24, 2015. HTML: https://littlebitesofcocoa.com/154-return-of-the-uikit-b-sides

Today we're [continuing](https://littlebitesofcocoa.com/151) our [look](https://littlebitesofcocoa.com/152) at lesser-known _UIKit_ features. Let's get started:

## Fixing Unwanted Undo Prompts

Ever been testing an **app** and have an unwanted "Undo" prompt appear? This can be dynamically enabled or disabled with a **property** on **UIApplication**: 

``` swift
UIApplication.sharedApplication()
  .applicationSupportsShakeToEdit = false
```

## Customizing Tab Bar Items Layout

We can use the **UITabBar's** `itemPositioning` **property** to control whether **tab bar items** use a "fill" or "centered" layout:

``` swift
let tabBarController = UITabBarController()
tabBarController.tabBar.itemPositioning = .Centered
```

## Significant Time Changes

The `applicationSignificantTimeChange` **app** **delegate function** lets us know when things like daylight savings time begin.

## Refresh Control Labels

**UIRefreshControl** has an `attributedTitle` **property** we can use to show a nice little bit of text when a user pulls to refresh:

``` swift
refreshControl.attributedTitle = attributedStringForRefreshControl()
```

<img src='https://media.littlebitesofcocoa.com/bite-assets/154-return-of-the-uikit-b-sides-refresh.png' style='max-width: 159px;' />

## In-App Dictionary View Controller

This one is awesome.

We can use a **reference library view controller** to display a nicely formatted screen depicting the definition of a term in our **app**. Neat!

``` swift
let vc = UIReferenceLibraryViewController(term: "awesome")
showViewController(vc, sender: nil)
```

<img src='https://media.littlebitesofcocoa.com/bite-assets/154-return-of-the-uikit-b-sides-uirvc.png' style='max-width: 186px;' />
