import UIKit

extension VCreateSearch
{
    //MARK: internal
    
    func animateShow()
    {
        viewBase.layoutTop.constant = 0
        
        UIView.animate(
            withDuration:kAnimationDuration,
        animations:
        { [weak self] in
            
            self?.layoutIfNeeded()
        })
        { [weak self] (done:Bool) in
            
            self?.viewBase.viewBar.searchBar.becomeFirstResponder()
        }
    }
    
    func animateHide()
    {
        viewBase.layoutTop.constant = -viewBase.kHeight
        
        UIView.animate(withDuration:kAnimationDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
}

import UIKit

extension VCreateSearch
{
    //MARK: private
    
    private func animate(listTop:CGFloat)
    {
        viewBase.layoutTop.constant = listTop
        
        UIView.animate(withDuration:kAnimationDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
    
    //MARK: internal
    
    func animateShow()
    {
        animate(listTop:0)
    }
    
    func animateHide()
    {
        animate(listTop:-viewBase.kHeight)
    }
}

--- 
+++ 
@@ -2,11 +2,28 @@
 
 extension VCreateSearch
 {
-    //MARK: private
+    //MARK: internal
     
-    private func animate(listTop:CGFloat)
+    func animateShow()
     {
-        viewBase.layoutTop.constant = listTop
+        viewBase.layoutTop.constant = 0
+        
+        UIView.animate(
+            withDuration:kAnimationDuration,
+        animations:
+        { [weak self] in
+            
+            self?.layoutIfNeeded()
+        })
+        { [weak self] (done:Bool) in
+            
+            self?.viewBase.viewBar.searchBar.becomeFirstResponder()
+        }
+    }
+    
+    func animateHide()
+    {
+        viewBase.layoutTop.constant = -viewBase.kHeight
         
         UIView.animate(withDuration:kAnimationDuration)
         { [weak self] in
@@ -14,16 +31,4 @@
             self?.layoutIfNeeded()
         }
     }
-    
-    //MARK: internal
-    
-    func animateShow()
-    {
-        animate(listTop:0)
-    }
-    
-    func animateHide()
-    {
-        animate(listTop:-viewBase.kHeight)
-    }
 }
Make search bar first responder on appear
