         return  UIImage(cgImage: outputImage.cgImage!, scale: scale, orientation: UIImageOrientation.up)
     }
     
-    /** Store values */
-    /** Value in Dictionary on ControlState */
-    fileprivate func store(_ value:AnyObject?, onDic:NSMutableDictionary!, state:UIControlState) {
-        if let _value: AnyObject = value  {
-            onDic.setValue(_value, forKey: "\(state.rawValue)")
+
+    /** Store and recorver values */
+    /** Value in Dictionary for ControlState */
+
+    fileprivate func getValueFrom<T>(type: T.Type, on dic: NSMutableDictionary!, for state: UIControlState) -> T? {
+        
+        if let value =  dic.value(forKey: "\(state.rawValue)") as AnyObject? {
+            return value as? T
+        }
+        
+        return dic.value(forKey: "\(UIControlState.normal.rawValue)") as? T
+    }
+    
+    fileprivate func store<T>(_ value: T?, in dic:NSMutableDictionary!, for state:UIControlState) {
+        if let _value = value as AnyObject?  {
+            dic.setValue(_value, forKey: "\(state.rawValue)")
         }
         else {
-            onDic.removeObject(forKey: "\(state.rawValue)")
+            dic.removeObject(forKey: "\(state.rawValue)")
         }
         self.configureControl(for: self.currentControlState())
     }

        
        // Images - Icons
        if (super.image(for: UIControlState.normal) != nil) {
            self.store(super.image(for: UIControlState.normal), onDic: imagens, state: UIControlState.normal)
        }
        if (super.image(for: UIControlState.highlighted) != nil) {
            self.store(super.image(for: UIControlState.highlighted), onDic: imagens, state: UIControlState.highlighted)
        }
        if (super.image(for: UIControlState.disabled) != nil) {
            self.store(super.image(for: UIControlState.disabled), onDic: imagens, state: UIControlState.disabled)
        }
        if (super.image(for: UIControlState.selected) != nil) {
            self.store(super.image(for: UIControlState.selected), onDic: imagens, state: UIControlState.selected)
        }
        
        // Title - Texts
        if let titleNormal = super.title(for: .normal) {
            self.store(titleNormal as AnyObject?, onDic: texts, state: .normal)
        }
        if let titleHighlighted = super.title(for: .highlighted) {
            self.store(titleHighlighted as AnyObject?, onDic: texts, state: .highlighted)
        }
        if let titleDisabled = super.title(for: .disabled) {
            self.store(titleDisabled as AnyObject?, onDic: texts, state: .disabled)
        }
        if let titleSelected = super.title(for: .selected) {
            self.store(titleSelected as AnyObject?, onDic: texts, state: .selected)
        }
        
    }

    }
    
    override open func setImage(_ image: UIImage!, for state: UIControlState) {
        self.store(image, in: self.imagens, for: state)
        if super.image(for: state) != image {
            super.setImage(image, for: state)
        }
