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


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







}

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

public class EGMenuBar: UIView {
