     }
     
     public func pickerView(_ pickerView: SDPickerView, viewForRow row: Int, reusing view: UIView?) -> UIView {
-        let view = view as? UILabel ?? UILabel()
-        view.attributedText = self.pickerView(pickerView, attributedTitleForRow: row)
+        
+        let view = view ?? UIView()
+        
+        let label = view.subviews.first as? UILabel ?? UILabel()
+        label.attributedText = self.pickerView(pickerView, attributedTitleForRow: row)
+        
+        view.subviews.first?.removeFromSuperview()
+        view.addSubview(label)
+        
+        label.translatesAutoresizingMaskIntoConstraints = false
+        NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "V:|[label]|", options: [], metrics: nil, views: ["label": label]))
+        NSLayoutConstraint.activate(NSLayoutConstraint.constraints(withVisualFormat: "H:|-[label]-|", options: [], metrics: nil, views: ["label": label]))
+        
         return view
     }
     

    
    func rowHeight(in pickerView: SDPickerView) -> CGFloat
    
    func pickerView(_ pickerView: SDPickerView, titleForRow row: Int) -> String?
    
    func pickerView(_ pickerView: SDPickerView, attributedTitleForRow row: Int) -> NSAttributedString?

    
    @IBInspectable open var pickerBackgroundColor: UIColor? = DEFAULT_BACKGROUND_COLOR
    
    open var selectedRow: Int = 0 {
        didSet {
            self.reloadData()
        }
    }
    
    open var numberOfRows: Int {
        return dataSource?.numberOfRows(in: self) ?? 0
    }
    
