 import UIKit
 
 
-open class FormatBar: UIToolbar
-{
+// MARK: - FormatBar
+//
+open class FormatBar: UIView {
 
     open weak var formatter: FormatBarDelegate?
 
 
-    override open var items: [UIBarButtonItem]? {
+    open var items = [FormatBarItem]() {
+        willSet {
+            for item in items {
+                item.removeFromSuperview()
+            }
+        }
         didSet {
-            for item in formatBarItems {
+            for item in items {
                 configureButtonStyle(item)
                 configureButtonAction(item)
             }


    open var enabled = true {
        didSet {
            for item in formatBarItems {
                item.isEnabled = enabled
            }
        }
    }


    open var formatBarItems: [FormatBarItem] {
        guard let items = items else {
            return [FormatBarItem]()
        }
        return items.filter({ (element) -> Bool in
            if let _ = element as? FormatBarItem {
                return true
            }
            return false
        }) as! [FormatBarItem]
    }




    open var disabledTintColor: UIColor? {
        didSet {
            for item in items {
                item.disabledTintColor = disabledTintColor
            }
        }
