     override func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
         let footer = UIView(frame: CGRectMake(0, 0, tableView.frame.size.width, 40));
         footer.backgroundColor = UIColor.colorWithHex("#EEEEEE")
-        if (section == 1) {
+        
+        if (section == 1 || section == 2) {
             let border = CALayer();
             border.frame = CGRectMake(0, 0, tableView.frame.size.width, 0.5)
             border.backgroundColor = UIColor.colorWithHex("#CCCCCC")?.CGColor

import Foundation
import UIKit

class SettingsController : UITableViewController {
    @IBOutlet weak var passwordField: UITextField!
    @IBOutlet weak var showPasswordSwitch: UISwitch!
    
    var config = NSUserDefaults.standardUserDefaults()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        tableView.separatorColor = UIColor.colorWithHex("#cccccc")
        
        if let show = config.valueForKey("showPassword") as? Bool {
            showPasswordSwitch.on = show
        }

        
        return footer
    }
    
    
    func getBottomBorder() -> CALayer {
        let border = CALayer();
        
        border.frame = CGRectMake(0, 22, tableView.frame.size.width, 0.5)
        border.backgroundColor = UIColor.colorWithHex("#CCCCCC")?.CGColor
        
        return border
    }
    
    func getLabel() -> UILabel {
        let text = UILabel(
            frame: CGRectMake(18, -4 ,
            tableView.frame.size.width, 28)
        )
        
        text.font = UIFont.systemFontOfSize(14.0)
        text.textColor = UIColor.colorWithHex("#666666")
        
        return text
    }
    
    func textFieldShouldReturn(textField: UITextField) -> Bool {
        textField.resignFirstResponder()
        return true
    }
}

