     
     /// Set title padding scale to view left and right tiltle / view
     var titlePaddingScale: CGFloat = 0.8 {
-        didSet {
-            reloadData()
-        }
+        didSet { reloadData() }
     }
     
     /// Show all item in picker view, once set true titlePadding will not work here
     var showAllItem = false {
-        didSet {
-            reloadData()
-        }
+        didSet { reloadData() }
     }
     
     /// Set title text color for MBPicker View
     var titleAttributes: MBPickerViewTitleAttribute! = MBPickerViewTitleAttribute.defaultAttribute() {
-        didSet {
-            reloadData()
-        }
+        didSet { reloadData() }
     }
     
     /// Select a specific item in MBPickerView

    
    /// Set title padding to view other item from Picker View
    fileprivate var titlePadding: CGFloat {
        return showAllItem ? 0 : pickerCollectionView.bounds.width*titlePaddingScale/3
    }
    
    /// Number of item in picker

    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        delegate?.pickerView?(self, willSelectItem: indexPath.item)
        collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
        var reloadIndexes: [IndexPath] = []
        if !showAllItem {
            reloadIndexes = collectionView.visibleIndexPath
        } else if indexPath != lastSelectedIndex {
              reloadIndexes = [lastSelectedIndex, indexPath]
        } else {
            reloadIndexes = [indexPath]
        }
        lastSelectedIndex = indexPath
        pickerCollectionView.reloadItems(at:reloadIndexes)
        delegate?.pickerView?(self, didSelectItem: indexPath.item)
    }
    
