 
 extension EGMenuBar: EGMenuBarItemDelegate {
     func didSelectItemAtIndex(index: Int) {
-        delegate?.didSelectItemAtIndex?(self, index: index)
-    }
-}
-
-
-
-
-
-
+        delegate?.didSelectItemAtIndex!(self, index: index)
+    }
+}
+
+
+
+
+
+

    // MARK: - Helper Methods
    
    private func setupMenuView() {
        print("setup")
        if let height = delegate?.itemHeight?(self) {
            print("height: \(height)")
            itemHeight = CGFloat(height)
        }
        if let spacing = delegate?.interItemSpacing?(self) {
            print("spacing: \(spacing)")
            interItemSpacing = CGFloat(spacing)
        }
        if let numberOfItems = datasource?.numberOfItems() {

}

@objc public protocol EGMenuBarDelegate: class {
    optional func didSelectItemAtIndex(menuBar: EGMenuBar, index: Int)
    optional func interItemSpacing(menuBar: EGMenuBar) -> Double
    optional func itemHeight(menuBar: EGMenuBar) -> Double
}

