swift how to change the header color
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let returnedView = UIView(frame: CGRectMake(x, y, width, height)) //set these values as necessary
returnedView.backgroundColor = UIColor.lightGrayColor()
let label = UILabel(frame: CGRectMake(labelX, labelY, labelWidth, labelHeight))
label.text = self.sectionHeaderTitleArray[section]
returnedView.addSubview(label)
return returnedView
}
Also in Swift:
- loop backwards swift
- swift animate a label ishidden
- rxswift map
- swift swipe gesture
- xcode enable a button after a text field is filled
- remove padding hstack swiftui
- swift textfield trim special characters before database
- go to view controller programmatically swift
- ios rounded button
- swift corner radious of view controller
- round up swift
- swift set constraint programmatically
- swift get slected row data in tableview cell
- hide status bar in tableview cell in swift
- check when webview finish loading swift
- number of characters in a string swift
- add buton border swift
- swift pop to specific view controller
- custom binding swiftui
- Make a VStack fill the width of the screen in SwiftUI
- how to dismiss keyboard swiftui
- swift toggle on change
- UISearchController keys
- swift change background color