Add a border layer of the color of your choise around the device screen. Perfect to show an active state, or a recording state.


CocoaPods Compatible Carthage compatible License Platform

Overlay preview

Adds a UIWindow containing a border layer of the color of your choise. Perfect to show an active state, or a recording state.


  • iOS 9 & tvOS 9 compatible
  • Add a border layer on the screen
  • Adapts perfectly with the bezels of the device if any
  • Animates in, out and "breathe"
  • Supports any borders width & colors
  • Allow to disable user interactions (and a whitelist of view still interactable)


  • iOS ≥ 9 or tvOS ≥ 9
  • Xcode ≥ 10.2
  • Xcode ≥ 11 for Swift Package Manager integration


Swift Package Manager

Only with Xcode 11+, add this repository to you project as a swift package.


Specify in your Podfile:

target 'MyApp' do
pod 'RecordingOverlay'


Specify in your Cartfile

github "Dean151/RecordingOverlay"


You can instanciate a basic overlay with a static helper

// Show an overlay for 3s
let overlay =
DispatchQueue.main.asyncAfter(deadline: .now + 3) {

Or you may want to set things up a bit more:

// If you don't need to make your settings persistents after hiding,
// Store it in a weak variable. The overlay will retain itself while beeing shown.
weak var overlay: RecordingOverlay?

func viewDidAppear(_ animated: Bool) {
    let overlay = RecordingOverlay()
    // Change the color
    overlay.color = .blue
    // And the border size
    overlay.length = 10
    // You may also want to disable the default "breathing" animation
    overlay.isAnimated = false
    // Then show it on the screen animated)
    // It's shown, so it's autoretaining itself. The weak property will just be a reference.
    self.overlay = overlay

func viewDidDisappear(_ animated: Bool) {
    self.overlay?.hide(animated: animated)
    // overlay is now nil since it's not retained anymore.

And you can also disable the user interactions completely, or partly:

// Disable user interactions, except for one view
overlay.disableInteractions(exceptFor: myViewInteractable)

// Or multiple views. When called multiple times, only the last list of views will be taken into account
overlay.disableInteractions(exceptFor: [view1, view2])

// Either you hide the the overlay to make the user returning the control, or you can enable back the interactions

An issue?

Don't hesitate to fill an issue on Github, and/or contribute by forking and then propose changes via a Pull Request


  • Swift Tools 5.1.0
View More Packages from this Author


  • None
Last updated: Sun Jan 15 2023 15:25:29 GMT-0500 (GMT-05:00)