---
title: "#212: Elegant Volume Changes with SubtleVolume 🔊"
url: https://littlebitesofcocoa.com/212-elegant-volume-changes-with-subtlevolume
author: Jake Marsh
date: 2016-03-15
published: 2016-03-15
topics: ["Libraries","UIKit"]
description: "Setting our app apart can be tricky. We don't want to deviate too far from established conventions, but we don't want to blend in to the crowd either."
---

# #212: Elegant Volume Changes with SubtleVolume 🔊

By Jake Marsh, March 15, 2016. HTML: https://littlebitesofcocoa.com/212-elegant-volume-changes-with-subtlevolume

<img src='https://media.littlebitesofcocoa.com/bite-assets/212-elegant-volume-changes-with-subtlevolume-example.png' style='max-width: 419px; float: right; margin-left: 20px; margin-bottom: 20px;' />

Setting our **app** apart can be tricky. We don't want to deviate <i>too</i> far from established conventions, but we don't want to blend in to the crowd either. Small amounts of "polish" to an **app's** UI can go a long way to making it feel special.

Today we'll check out one more tool in our arsenal for doing this. It's a library from [Andrea Mazzini](https://github.com/andreamazz) called [SubtleVolume](https://github.com/andreamazz/SubtleVolume).

The idea here is to improve upon the default, screen-obscuring, built-in volume overlay. **iOS's** system interface is fine for most **apps**, but often it can get in the way of the <i>content</i> the underlying **app** is presenting.

[SubtleVolume](https://github.com/andreamazz/SubtleVolume) solves this by providing an elegant volume **view** that we can put anywhere on the **screen**. Let's try it out:

``` swift
let volume = SubtleVolume(style: .Plain)

volume.frame = CGRect(x: 0, y: 20, width: w, height: 4)
volume.barTintColor = .whiteColor()
volume.barBackgroundColor = UIColor(white: 1.0, alpha: 0.3)
volume.animation = .FadeIn

view.addSubview(volume)
```

Now, the **view** will automatically hide/show when the user changes the volume, Neat!

More info about _SubtleVolume_ can be found at [git.io/subtlevolume](http://git.io/subtlevolume)
