 }
 
 extension ILTranslucentView {
-    private func createUI() {
+    fileprivate func createUI() {
         self.ilColorBG = self.backgroundColor
-        
+
         self.translucent = true
         self.translucentAlpha = 1
 
         let _nonExistentSubview = UIView(frame: self.bounds)
-        _nonExistentSubview.backgroundColor = UIColor.clearColor()
+        _nonExistentSubview.backgroundColor = UIColor.clear
         _nonExistentSubview.clipsToBounds = true
-        _nonExistentSubview.autoresizingMask = [UIViewAutoresizing.FlexibleBottomMargin, UIViewAutoresizing.FlexibleLeftMargin, UIViewAutoresizing.FlexibleRightMargin, UIViewAutoresizing.FlexibleTopMargin]
+        _nonExistentSubview.autoresizingMask = [UIViewAutoresizing.flexibleBottomMargin, UIViewAutoresizing.flexibleLeftMargin, UIViewAutoresizing.flexibleRightMargin, UIViewAutoresizing.flexibleTopMargin]
         self.nonExistentSubview = _nonExistentSubview
-        self.insertSubview(self.nonExistentSubview!, atIndex: 0)
+        self.insertSubview(self.nonExistentSubview!, at: 0)
 
         let _toolbarContainerClipView = UIView(frame: self.bounds)
-        _toolbarContainerClipView.backgroundColor = UIColor.clearColor()
+        _toolbarContainerClipView.backgroundColor = UIColor.clear
         _toolbarContainerClipView.clipsToBounds = true
-        _toolbarContainerClipView.autoresizingMask = [UIViewAutoresizing.FlexibleBottomMargin, UIViewAutoresizing.FlexibleLeftMargin, UIViewAutoresizing.FlexibleRightMargin, UIViewAutoresizing.FlexibleTopMargin]
+        _toolbarContainerClipView.autoresizingMask = [UIViewAutoresizing.flexibleBottomMargin, UIViewAutoresizing.flexibleLeftMargin, UIViewAutoresizing.flexibleRightMargin, UIViewAutoresizing.flexibleTopMargin]
         self.toolbarContainerClipView = _toolbarContainerClipView
         self.nonExistentSubview!.addSubview(self.toolbarContainerClipView!)
 
         var rect = self.bounds
         rect.origin.y -= 1
         rect.size.height += 1
-        
+
         let _toolbarBG = UIToolbar(frame: rect)
-        _toolbarBG.autoresizingMask = [UIViewAutoresizing.FlexibleWidth, UIViewAutoresizing.FlexibleHeight]
+        _toolbarBG.autoresizingMask = [UIViewAutoresizing.flexibleWidth, UIViewAutoresizing.flexibleHeight]
         self.toolbarBG = _toolbarBG
-        
+
         self.toolbarContainerClipView!.addSubview(self.toolbarBG!)
         self.ilDefaultColorBG = self.toolbarBG!.barTintColor
-        
+
         let _overlayBackgroundView = UIView(frame: self.bounds)
         _overlayBackgroundView.backgroundColor = self.backgroundColor
-        _overlayBackgroundView.autoresizingMask = [UIViewAutoresizing.FlexibleWidth, UIViewAutoresizing.FlexibleHeight]
+        _overlayBackgroundView.autoresizingMask = [UIViewAutoresizing.flexibleWidth, UIViewAutoresizing.flexibleHeight]
         self.overlayBackgroundView = _overlayBackgroundView
         self.toolbarContainerClipView!.addSubview(self.overlayBackgroundView!)
-        
-        self.backgroundColor = UIColor.clearColor()
+
+        self.backgroundColor = UIColor.clear
         self.initComplete = true
     }
-    
-    private func isItClearColor(color: UIColor) -> Bool {
+
+    fileprivate func isItClearColor(_ color: UIColor) -> Bool {
         var red : CGFloat = 0.0
         var green : CGFloat = 0.0
         var blue : CGFloat = 0.0

            return _translucentAlpha
        }
    }
    
    @IBInspectable public var translucentStyle : UIBarStyle {
        set {
            if self.toolbarBG != nil {
                self.toolbarBG!.barStyle = newValue

import UIKit

@IBDesignable
open class ILTranslucentView: UIView {

    fileprivate var _translucent = true
    @IBInspectable open var translucent : Bool {
        set {
            _translucent = newValue
            if self.toolbarBG == nil {
                return
            }

            self.toolbarBG!.isTranslucent = newValue

            if newValue {
                self.toolbarBG!.isHidden = false
                self.toolbarBG!.barTintColor = self.ilColorBG
                self.backgroundColor = UIColor.clear
            } else {
                self.toolbarBG!.isHidden = true
                self.backgroundColor = self.ilColorBG
            }
        }
