         return UITableViewAutomaticDimension
     }
 
-    override func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        // empty headers should be 13px high, but headers with text should be 44
-        var height: CGFloat = 13
-        let section = settings[section]
-        if let sectionTitle = section.title {
-            if sectionTitle.length > 0 {
-                height = 44
-            }
-        }
-        return height
-    }
-
     override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
         let section = settings[indexPath.section]
         if let setting = section[indexPath.row] where setting.enabled {


    var titleAlignment: TitleAlignment = .Bottom {
        didSet {
            if oldValue != titleAlignment {
                switch titleAlignment {
                case .Top:
                    titleLabel.snp_remakeConstraints { make in
                        make.left.equalTo(self).offset(SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                        make.right.lessThanOrEqualTo(self).offset(-SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                        make.top.equalTo(self).offset(SettingsTableSectionHeaderFooterViewUX.titleVerticalPadding)
                    }
                case .Bottom:
                    titleLabel.snp_remakeConstraints { make in
                        make.left.equalTo(self).offset(SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                        make.right.lessThanOrEqualTo(self).offset(-SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                        make.bottom.equalTo(self).offset(-SettingsTableSectionHeaderFooterViewUX.titleVerticalPadding)
                    }
                }
            }
        }
    }


        titleLabel.text = nil
        titleAlignment = .Bottom
    }

    private func remakeTitleAlignmentConstraints() {
        switch titleAlignment {
        case .Top:
            titleLabel.snp_remakeConstraints { make in
                make.left.right.equalTo(self).inset(SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                make.top.equalTo(self).offset(SettingsTableSectionHeaderFooterViewUX.titleVerticalPadding)
                make.bottom.equalTo(self).offset(-SettingsTableSectionHeaderFooterViewUX.titleVerticalLongPadding)
            }
        case .Bottom:
            titleLabel.snp_remakeConstraints { make in
                make.left.right.equalTo(self).inset(SettingsTableSectionHeaderFooterViewUX.titleHorizontalPadding)
                make.bottom.equalTo(self).offset(-SettingsTableSectionHeaderFooterViewUX.titleVerticalPadding)
                make.top.equalTo(self).offset(SettingsTableSectionHeaderFooterViewUX.titleVerticalLongPadding)
            }
        }
    }
}
