Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

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
}
Comment

PREVIOUS NEXT
Code Example
Swift :: add corner radius to uiview swift 
Swift :: swift doc comments 
Swift :: add top corner radius swift 
Swift :: swiftui full screen sheet 
Swift :: swift thread.sleep 
Swift :: rotate image animated swift 
Swift :: swift 5 only the day number from date 
Swift :: swift webview load html 
Swift :: how to loop swift 
Swift :: swift tuple 
Swift :: convert string to unit swift 
Swift :: swift iterate over a dictionary 
Swift :: view controller modal fullscreen programmatically swift 5 
Swift :: uitextview placeholder uikit ios 
Swift :: change background color of uitableview section header 
Swift :: remove all add TapGestureRecognizer swift 
Swift :: symfony swiftmailer 
Swift :: how to get the path of selected PDF/doc from file manager in ios swift programmatically 
Swift :: swift uilabel dynamic height based on text length 
Swift :: xcode execute code after when navigating back to screen 
Swift :: float vs double in swift 
Swift :: swift switch statement 
Swift :: Swift Named Associated Values 
Swift :: xcode how to get aspect ratio of device 
Swift :: Save and Load Data From Keychain ios swift 
Swift :: Swift static Property 
Swift :: Swift Print Variables and Strings together 
Swift :: swift weekday date component values 
Swift :: Alamofire upload multiple image with parameters swift 5 site:stackoverflow.com 
Swift :: swift 5 on return button action 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =