Answers for "how to change title colour in swift"

1

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
}
Posted by: Guest on December-20-2019
1

swiftui font color

Text("The best laid plans")
    .foregroundColor(Color.red)
Posted by: Guest on February-18-2021

Code answers related to "how to change title colour in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language