     }
 
     // MARK: - Helpers
-    
+
     private func show(with activityData: ActivityData) {
         let activityContainer: UIView = UIView(frame: UIScreen.main.bounds)
-        
+
         activityContainer.backgroundColor = activityData.backgroundColor
         activityContainer.restorationIdentifier = restorationIdentifier
-        
+        activityContainer.translatesAutoresizingMaskIntoConstraints = false
         activitySize = activityData.size
-        
+
         let activityIndicatorView = NVActivityIndicatorView(
             frame: CGRect(x: 0, y: 0, width: activitySize.width, height: activitySize.height),
             type: activityData.type,
             color: activityData.color,
             padding: activityData.padding)
-        
-        activityIndicatorView.center = activityContainer.center
+
         activityIndicatorView.startAnimating()
+        activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
         activityContainer.addSubview(activityIndicatorView)
-        
-        //Add constraints to activityIndicatorView
-        activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
-        let indicatorCenterXConstraint = NSLayoutConstraint(item: activityIndicatorView, attribute: .centerX, relatedBy: .equal, toItem: activityContainer, attribute: .centerX, multiplier: 1, constant: 0)
-        let indicatorCenterYConstraint = NSLayoutConstraint(item: activityIndicatorView, attribute: .centerY, relatedBy: .equal, toItem: activityContainer, attribute: .centerY, multiplier: 1, constant: 0)
-        activityContainer.addConstraints([indicatorCenterXConstraint, indicatorCenterYConstraint])
-        
+
+        // Add constraints for `activityIndicatorView`.
+        ({
+            let xConstraint = NSLayoutConstraint(item: activityContainer, attribute: .centerX, relatedBy: .equal, toItem: activityIndicatorView, attribute: .centerX, multiplier: 1, constant: 0)
+            let yConstraint = NSLayoutConstraint(item: activityContainer, attribute: .centerY, relatedBy: .equal, toItem: activityIndicatorView, attribute: .centerY, multiplier: 1, constant: 0)
+
+            activityContainer.addConstraints([xConstraint, yConstraint])
+            }())
+
         activityLabel.font = activityData.messageFont
         activityLabel.textColor = activityData.textColor
         setMessage(activityData.message)
         activityContainer.addSubview(activityLabel)
-        
-        //Add constraints to activityLabel
-        let labelCenterXConstraint = NSLayoutConstraint(item: activityLabel, attribute: .centerX, relatedBy: .equal, toItem: activityContainer, attribute: .centerX, multiplier: 1, constant: 0)
-        let labelCenterYConstraint = NSLayoutConstraint(item: activityLabel, attribute: .centerY, relatedBy: .equal, toItem: activityContainer, attribute: .centerY, multiplier: 1, constant: 0)
-        activityContainer.addConstraints([labelCenterXConstraint, labelCenterYConstraint])
-        
+
+        // Add constraints for `activityLabel`.
+        ({
+            let leadingConstraint = NSLayoutConstraint(item: activityContainer, attribute: .leading, relatedBy: .equal, toItem: activityLabel, attribute: .leading, multiplier: 1, constant: 8)
+            let trailingConstraint = NSLayoutConstraint(item: activityContainer, attribute: .trailing, relatedBy: .equal, toItem: activityLabel, attribute: .trailing, multiplier: 1, constant: 8)
+
+            activityContainer.addConstraints([leadingConstraint, trailingConstraint])
+            }())
+        ({
+            let spacingConstraint = NSLayoutConstraint(item: activityLabel, attribute: .top, relatedBy: .equal, toItem: activityIndicatorView, attribute: .bottom, multiplier: 1, constant: 8)
+
+            activityContainer.addConstraint(spacingConstraint)
+            }())
+
+        guard let keyWindow = UIApplication.shared.keyWindow else { return }
+
+        keyWindow.addSubview(activityContainer)
+
+        // Add constraints for `activityContainer`.
+        ({
+            let leadingConstraint = NSLayoutConstraint(item: keyWindow, attribute: .leading, relatedBy: .equal, toItem: activityContainer, attribute: .leading, multiplier: 1, constant: 0)
+            let trailingConstraint = NSLayoutConstraint(item: keyWindow, attribute: .trailing, relatedBy: .equal, toItem: activityContainer, attribute: .trailing, multiplier: 1, constant: 0)
+            let topConstraint = NSLayoutConstraint(item: keyWindow, attribute: .top, relatedBy: .equal, toItem: activityContainer, attribute: .top, multiplier: 1, constant: 0)
+            let bottomConstraint = NSLayoutConstraint(item: keyWindow, attribute: .bottom, relatedBy: .equal, toItem: activityContainer, attribute: .bottom, multiplier: 1, constant: 0)
+
+            keyWindow.addConstraints([leadingConstraint, trailingConstraint, topConstraint, bottomConstraint])
+            }())
+
         hideTimer = scheduledTimer(activityData.minimumDisplayTime, selector: #selector(hideTimerFired(_:)), data: nil)
-        guard let keyWindow = UIApplication.shared.keyWindow else { return }
-        keyWindow.addSubview(activityContainer)
-        
-        //Add constraints to activityContainer
-        activityContainer.translatesAutoresizingMaskIntoConstraints = false
-        let containerLeadingConstraint = NSLayoutConstraint(item: activityContainer, attribute: .leading, relatedBy: .equal, toItem: keyWindow, attribute: .leading, multiplier: 1, constant: 0)
-        let containerTrailingConstraint = NSLayoutConstraint(item: activityContainer, attribute: .trailing, relatedBy: .equal, toItem: keyWindow, attribute: .trailing, multiplier: 1, constant: 0)
-        let containerTopConstraint = NSLayoutConstraint(item: activityContainer, attribute: .top, relatedBy: .equal, toItem: keyWindow, attribute: .top, multiplier: 1, constant: 0)
-        let containerBottomConstraint = NSLayoutConstraint(item: activityContainer, attribute: .bottom, relatedBy: .equal, toItem: keyWindow, attribute: .bottom, multiplier: 1, constant: 0)
-        keyWindow.addConstraints([containerLeadingConstraint, containerTrailingConstraint, containerTopConstraint, containerBottomConstraint])
-    }
-    
+    }
+
     private func hide() {
         guard let keyWindow = UIApplication.shared.keyWindow else { return }
-        
+
         for item in keyWindow.subviews
             where item.restorationIdentifier == restorationIdentifier {
                 item.removeFromSuperview()

    private var hideTimer: Timer?
    private var isStopAnimatingCalled = false
    private let restorationIdentifier = "NVActivityIndicatorViewContainer"
  
    private var activitySize = NVActivityIndicatorView.DEFAULT_BLOCKER_SIZE

    private let activityLabel: UILabel = {
        let activityLabel = UILabel()
        activityLabel.textAlignment = .center
        activityLabel.numberOfLines = 0
        return activityLabel
    }()

    /// Shared instance of `NVActivityIndicatorPresenter`.
    public static let sharedInstance = NVActivityIndicatorPresenter()
    
    private init() { }
    
    // MARK: - Public interface
    
    /**
     Display UI blocker.
     
     - parameter data: Information package used to display UI blocker.
     */
    public final func startAnimating(_ data: ActivityData) {

        isStopAnimatingCalled = false
        showTimer = scheduledTimer(data.displayTimeThreshold, selector: #selector(showTimerFired(_:)), data: data)
    }

    /**
     Remove UI blocker.
     */
