I am new to iPhone development. I have created one view controller and I used grouped table view. Now I want to display the header view in my viewcontroller with image and labels. Please guide me and help me out in this problem.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you mean a headerView or a sectionHeaderView? You can add subviews to the headerView in the
viewDidLoadmethod:You specify size and position of the label with the
initWithFramemethod, and add the label as subview to the tableHeaderView – you can do this with multiple labels.If you mean the sectionHeader you have to implement the
tableView:viewForHeaderInSection:method, where you have to create a new view, and add different subviews to it:In this case you also have to implement the method
tableView:heightForHeaderInSection:which has to return the height of the view you create in the above method: