                     
                     // within range of center container
                     if currentXOffset.constant < (horizontalSnapThresholdFraction * view.frame.size.width) {
-                        showContainer(.Center)
+                        showEmbeddedView(.Center)
                     }
                         
                         // within range of left container
                     else if currentXOffset.constant > ((1.0 - horizontalSnapThresholdFraction) * view.frame.size.width) {
-                        showContainer(.Left)
+                        showEmbeddedView(.Left)
                     }
                         
                         // center region: depends on inertia direction
                     else {
                         // pulled right
                         if previousNonZeroDirectionChange.dx > 0.0 {
-                            showContainer(.Left)
+                            showEmbeddedView(.Left)
                         }
                             
                             // pulled left
                         else {
-                            showContainer(.Center)
+                            showEmbeddedView(.Center)
                         }
                     }
                 }

    
    // delegate to handle containers events
    func onDone(sender: AnyObject)
    func onShowContainer(position: Position, sender: AnyObject)
}

public class SwipeNavigationController: UIViewController {

                    
                    // within range of center container
                    if currentXOffset.constant > (horizontalSnapThresholdFraction * -view.frame.size.width) {
                        showEmbeddedView(.Center)
                    }
                        
                        // within range of right container
                    else if currentXOffset.constant < ((1.0 - horizontalSnapThresholdFraction) * -view.frame.size.width) {
                        showEmbeddedView(.Right)
                    }
                        
                        // center region: depends on inertia direction
                    else {
                        // pulled left
                        if previousNonZeroDirectionChange.dx < 0.0 {
                            showEmbeddedView(.Right)
                        }
                            
                            // pulled right
                        else {
                            showEmbeddedView(.Center)
                        }
                    }
                }
