         }
     }
     
+    /**
+     Adds the provided view to the array of arranged subviews at the specified index.
+     
+     If index is already occupied, the stack view increases the size of the arrangedSubviews array and shifts all of its contents at the index and above to the next higher space in the array. Then the stack view stores the provided view at the index.
+     
+     The stack view also ensures that the arrangedSubviews array is always a subset of its subviews array. This method automatically adds the provided view as a subview of the stack view, if it is not already. When adding subviews, the stack view appends the view to the end of its subviews array. The index only affects the order of views in the arrangedSubviews array. It does not affect the ordering of views in the subviews array.
+     */
     public func insertArrangedSubview(view: UIView, atIndex stackIndex: Int) {
         if !arrangedSubviews.contains(view) {
             view.translatesAutoresizingMaskIntoConstraints = false

    
    // MARK: Managing Arranged Views
    
    public func addArrangedSubview(view: UIView) {
        insertArrangedSubview(view, atIndex: arrangedSubviews.count)
    }

    public func removeArrangedSubview(view: UIView) {
        if let index = arrangedSubviews.indexOf(view) {
            arrangedSubviews.removeAtIndex(index)

            invalidateLayout()
        }
    }
    
    /// Removes subview from arranged subviews.
    public override func willRemoveSubview(subview: UIView) {
        removeArrangedSubview(subview)
    }
    
    // MARK: Hiding Views
    
    /// Updates stack view's layout to hide/show a given view. The view remains a subview of the stack view, but it's width (or height for vertical stack view) is reduced to 0. This method doesn't change view's `hidden` property.
    public func setArrangedView(view: UIView, hidden: Bool) {
        if hidden {
            hiddenViews.insert(view)
