     // MARK: Data Source
     
     public func reloadTabs() {
-        let selectedItem = self.selectedItem
+        guard let dataSource = self.dataSource else {
+            // no effect if there is dataSource
+            return
+        }
+        
+        let tabCell = self.cell as! TabButtonCell
+        self.tabButtons().forEach { $0.removeFromSuperview() }
+        
+        let newItemsCount = dataSource.tabsControlNumberOfTabs(self)
+        for i in 0..<newItemsCount {
+            let item = dataSource.tabsControl(self, itemAtIndex: i)
+            let button = TabButton(withItem: item, target: self, action: #selector(TabsControl.selectTab(_:)))
+            
+            var borderMask = tabCell.borderMask
+            if i == 0 && self.automaticSideBorderMasks == true {
+                borderMask = borderMask.union(.Left)
+            }
+            if i == newItemsCount-1 && self.automaticSideBorderMasks == true {
+                borderMask = borderMask.union(.Right)
+            }
+            let buttonCell = button.cell as! TabButtonCell
+            buttonCell.borderMask = borderMask
+            
+            button.title = dataSource.tabsControl(self, titleForItem: item)
+//            button.state = (item == self.selectedItem) ? NSOnState : NSOffState
+            button.highlight(self.isHighlighted)
+            
+            if let img = dataSource.tabsControl?(self, iconForItem: item) {
+                button.icon = img
+            }
+            if let menu = dataSource.tabsControl?(self, menuForItem: item) {
+                button.menu = menu
+            }
+            if let altIcon = dataSource.tabsControl?(self, titleAlternativeIconForItem: item) {
+                button.alternativeTitleIcon = altIcon
+            }
+            
+            self.tabsView?.addSubview(button)
+        }
+        
+        self.layoutTabButtons(nil, animated: false)
+        self.updateAuxiliaryButtons()
+        self.invalidateRestorableState()
     }
     
     private func layoutTabButtons(buttons: Array<TabButton>?, animated anim: Bool) {

        self.invalidateRestorableState()
    }
    
    // MARK: Actions
    
    // MARK: Reordering
    
    // MARK : Selection
    
    public func selectedItemIndex() -> Int {
        return (self.selectedButton != nil) ? self.selectedButton!.tag : -1

        
    }
    
    // MARK: - Editing
    
    // MARK: - Drawing
    
    override public var opaque: Bool {
        return true
