I want to change the button text color which is in my Table view Footer. Here is code which i am using but it isn't working
override func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footerView = UIView(frame: CGRectMake(0, 0, tableView.frame.size.width, 40))
footerView.backgroundColor = UIColor.blackColor()
let rgbValue = 0x4097d4
let color = Util.getColor(rgbValue)
let button = UIButton(type: UIButtonType.System) as UIButton
button.frame = CGRectMake(0, 0, 414, 65)
button.setTitle("my Button", forState: UIControlState.Normal)
button.titleLabel?.textColor = UIColor.whiteColor()
button.titleLabel?.font = UIFont(name: "Montserrat-Regular", size: 20.0)
button.backgroundColor = UIColor( red: CGFloat(color[0]), green: CGFloat(color[1]), blue:CGFloat(color[2]), alpha: 1.0 )
footerView.addSubview(button)
return footerView
}
override func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 40.0
}
one problem is that text color doesn't change and another problem is I have a lot of static rows in my tableview. I am fixing the button at the bottom but the problem is when screen reaches at the end, If I click on the screen and drag screen above it still shows some white space after the button