 }
 
 public class NVActivityIndicatorView: UIView {
-private static let DEFAULT_TYPE: NVActivityIndicatorType = .Pacman
+    private static let DEFAULT_TYPE: NVActivityIndicatorType = .Pacman
     private static let DEFAULT_COLOR = UIColor.whiteColor()
-    private static let DEFAULT_SIZE: CGSize = CGSize(width: 40, height: 40)
+    private static let DEFAULT_PADDING: CGFloat = 0
     
     /// Animation type, value of NVActivityIndicatorType enum.
     public var type: NVActivityIndicatorType = NVActivityIndicatorView.DEFAULT_TYPE
 
     @available(*, unavailable, message="This property is reserved for Interface Builder. Use 'type' instead.")
-    @IBInspectable var TypeAdapter: Int {
+    @IBInspectable var typeName: String {
         get {
-            return self.type.rawValue
-        }
-        set (typeIndex) {
-            self.type = NVActivityIndicatorType(rawValue: typeIndex) ?? self.type
+            return String(self.type)
+        }
+        set (typeString) {
+            for item in NVActivityIndicatorType.allTypes {
+                if String(item).caseInsensitiveCompare(typeString) == NSComparisonResult.OrderedSame {
+                    self.type = item
+                    break
+                }
+            }
         }
     }
 
     /// Color of activity indicator view.
     @IBInspectable public var color: UIColor = NVActivityIndicatorView.DEFAULT_COLOR
 
+    /// Padding of activity indicator view.
+    @IBInspectable public var padding: CGFloat = NVActivityIndicatorView.DEFAULT_PADDING
+
     /// Current status of animation, this is not used to start or stop animation.
     public var animating: Bool = false
     

     */
    case BallRotateChase
    
    private func animation() -> NVActivityIndicatorAnimationDelegate {
        switch self {
        case .Blank:

        let animation: protocol<NVActivityIndicatorAnimationDelegate> = self.type.animation()
        
        self.layer.sublayers = nil

        let paddedRect = UIEdgeInsetsInsetRect(self.frame, UIEdgeInsetsMake(padding, padding, padding, padding))
        animation.setUpAnimationInLayer(self.layer, size: paddedRect.size, color: self.color)
    }
}
