     }
     
     // MARK: Overridden standard UIView methods
-    override func sizeThatFits(size: CGSize) -> CGSize {
+    override public func sizeThatFits(size: CGSize) -> CGSize {
         if (items.count < 2 || collapsed) {
             return CGSize(width: size.width, height: itemHeight)
         } else {

    
    // MARK: Add or remove items
    /// Add an array of items to the menu
    func addItems(names: [String]) {
        for name in names {
            addItem(name)
        }
    }
    
    /// Add a single item to the menu
    func addItem(name: String) {
        //if we have no selected items, we'll take it
        if items.isEmpty {
            selectedItem = name

import UIKit

/// Delegate protocol for receiving change in list selection
@objc public protocol DKDropMenuDelegate {
     func itemSelectedWithIndex(index: Int, name:String)
}

/// A simple drop down list like expandable menu for iOS
@IBDesignable
public class DKDropMenu: UIView {
    
    @IBInspectable public var itemHeight: CGFloat = 44
    @IBInspectable public var fontName: String = "HelveticaNeue-Thin"
    @IBInspectable public var textColor: UIColor = UIColor.darkGrayColor()
    @IBInspectable public var outlineColor: UIColor = UIColor.lightGrayColor()
    @IBInspectable public var selectedColor: UIColor = UIColor.greenColor()
    weak public var delegate: DKDropMenuDelegate? = nil  //notified when a selection occurs
    private var items: [String] = [String]()
    public var selectedItem: String? = nil {
        didSet {
            setNeedsDisplay()
        }
    }
    public var collapsed: Bool = true {
        didSet {
            //animate collapsing or opening
            UIView.animateWithDuration(0.5, delay: 0, options: .TransitionCrossDissolve, animations: {
