         layoutIfNeeded()
     }
     
+    
+    /// Registers a nib object containing a cell with the paging menu view under a specified identifier.
+    ///
+    /// - Parameters:
+    ///   - nib: A nib object that specifies the nib file to use to create the cell.
+    ///   - identifier: The reuse identifier for the cell. This parameter must not be nil and must not be an empty string.
     public func register(nib: UINib?, with identifier: String) {
         nibs[identifier] = nib
     }
     
+    
+    /// Returns a reusable paging menu view cell object for the specified reuse identifier and adds it to the menu.
+    ///
+    /// - Parameter identifier: A string identifying the cell object to be reused. This parameter must not be nil.
+    /// - Returns: The index specifying the location of the cell.
     public func dequeue(with identifier: String) -> PagingMenuViewCell {
         if var cells = queue[identifier], !cells.isEmpty {
             let cell = cells.removeFirst()


import UIKit

open class PagingMenuViewCell: UIView {
    open var isSelected: Bool = false
    public internal(set) var identifier: String!
    public internal(set) var index: Int!
}

public protocol PagingMenuViewDataSource: class {
    func numberOfItemForPagingMenuView() -> Int
    func pagingMenuView(pagingMenuView: PagingMenuView, cellForItemAt index: Int) -> PagingMenuViewCell
    func pagingMenuView(pagingMenuView: PagingMenuView, widthForItemAt index: Int) -> CGFloat
}

public protocol PagingMenuViewDelegate: UIScrollViewDelegate {
    func pagingMenuView(pagingMenuView: PagingMenuView, didSelectItemAt index: Int)
}

public class PagingMenuView: UIScrollView {
    public fileprivate(set) var visibleCells = [PagingMenuViewCell]()

    fileprivate var queue = [String: [PagingMenuViewCell]]()

        fatalError()
    }
    
    
    /// Returns the drawing area for a row identified by index.
    ///
    /// - Parameter index: An index that identifies a item by its index.
    /// - Returns: A rectangle defining the area in which the table view draws the row or right edge rect if index is over the number of items.
    public func rectForItem(at index: Int) -> CGRect? {
        guard index < frameQueue.count else {
            let lastFrame = frameQueue.last
