             
             case .Hidden:
                 delegate?.splitViewController?(self, willHideMasterViewController: master)
-                master.view.removeFromSuperview()
-                overlayHideButton?.removeFromSuperview()
+                if overlayHideButton == nil {
+                    master.view.removeFromSuperview()
+                } else {
+                    animateOutMasterViewControllerOverlay()
+                    overlayHideButton = nil
+                }
 
             case .Showing:
                 delegate?.splitViewController?(self, willShowMasterViewController: master)
                 if master.view.superview !== view {
                     view.addSubview(master.view)
                 }
-                overlayHideButton?.removeFromSuperview()
+                overlayHideButton = nil
 
             case .Overlay:
                 if master.view.superview !== view {
                     view.addSubview(master.view)
+                    animateInMasterViewControllerOverlay()
                 }
             }
             

        }
    }
    
    public var delegate: NGSplitViewControllerDelegate?
    private var overlayHideButton: UIButton?
    
    private enum MasterPresentationStyle {
        case Hidden

        }
    }
    
    public var detailViewController: UIViewController? {
        willSet {
            removeChild(detailViewController)
        }
