         buttonPressed(self.responseButton)
     }
     
-    func buttonPressed(_ button: UIButton)
-    {
-        self.infoButton.isSelected = false
-        self.requestButton.isSelected = false
-        self.responseButton.isSelected = false
-        
-        self.infoView.isHidden = true
-        self.requestView.isHidden = true
-        self.responseView.isHidden = true
-        
-        if button == self.infoButton {
-            self.infoButton.isSelected = true
-            self.infoView.isHidden = false
-            
-        } else if button == requestButton {
-            self.requestButton.isSelected = true
-            self.requestView.isHidden = false
-            
-        } else if button == responseButton {
-            self.responseButton.isSelected = true
-            self.responseView.isHidden = false
-            
-        }
+    func buttonPressed(_ sender: UIButton)
+    {
+        guard let selectedButtonIdx = self.headerButtons.index(of: sender) else { return }
+        let infoViews = [self.infoView, self.requestView, self.responseView]
+
+        UIView.animate(withDuration: 0.4,
+                       delay: 0.0,
+                       usingSpringWithDamping: 0.8,
+                       initialSpringVelocity: 0.7,
+                       options: .curveEaseInOut,
+                       animations: { [unowned self] in
+                            self.headerButtons.indices.forEach {
+                                let button = self.headerButtons[$0]
+                                let view = infoViews[$0]
+
+                                button.isSelected = button == sender
+                                view.frame = CGRect(x: CGFloat(-selectedButtonIdx + $0) * view.frame.size.width,
+                                                    y: view.frame.origin.y,
+                                                    width: view.frame.size.width,
+                                                    height: view.frame.size.height)
+                            }
+                       },
+                       completion: nil)
     }
     
     func responseBodyButtonPressed()

        self.title = "Details"
        
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(NFXDetailsController_iOS.actionButtonPressed(_:)))
        
        self.infoButton = createHeaderButton("Info", x: 0, selector: #selector(NFXDetailsController_iOS.infoButtonPressed))
        self.view.addSubview(self.infoButton)
        
        self.requestButton = createHeaderButton("Request", x: self.infoButton.frame.maxX, selector: #selector(NFXDetailsController_iOS.requestButtonPressed))
        self.view.addSubview(self.requestButton)
        
        self.responseButton = createHeaderButton("Response", x: self.requestButton.frame.maxX, selector: #selector(NFXDetailsController_iOS.responseButtonPressed))
        self.view.addSubview(self.responseButton)
        
        self.infoView = createDetailsView(getInfoStringFromObject(self.selectedModel), forView: .info)
        self.view.addSubview(self.infoView)
        
        self.requestView = createDetailsView(getRequestStringFromObject(self.selectedModel), forView: .request)
        self.view.addSubview(self.requestView)
        
        self.responseView = createDetailsView(getResponseStringFromObject(self.selectedModel), forView: .response)
        self.view.addSubview(self.responseView)
        
        infoButtonPressed()
        
    }
    
    func createHeaderButton(_ title: String, x: CGFloat, selector: Selector) -> UIButton

    var infoButton: UIButton = UIButton()
    var requestButton: UIButton = UIButton()
    var responseButton: UIButton = UIButton()

    private var copyAlert: UIAlertController?

    var infoView: UIScrollView = UIScrollView()
    var requestView: UIScrollView = UIScrollView()
    var responseView: UIScrollView = UIScrollView()

    private lazy var headerButtons: [UIButton] = {
        return [self.infoButton, self.requestButton, self.responseButton]
    }()

    private lazy var infoViews: [UIScrollView] = {
        return [self.infoView, self.requestView, self.responseView]
    }()

    override func viewDidLoad()
    {
        super.viewDidLoad()
