ios - How do I add an image to the UITableViewHeaderFooterView? -
can me figure out how add , image header view? code tried using doesn't work. below have far. - (void)tableview:(uitableview *)tableview willdisplayheaderview:(uiview *)view forsection:(nsinteger)section { uitableviewheaderfooterview *headerview = (uitableviewheaderfooterview*)view; if (headerview != nil) { headerview.contentview.backgroundcolor = [uicolor greencolor]; uiimageview *imageview = [[uiimageview alloc] initwithframe:cgrectmake(200.0f, 0.0f, 100.0f, 25.0f)]; *imageview.image = [uiimageview = image.png];* //this line doesn't work. [headerview.contentview addsubview:imageview]; uilabel *mainlabel = [[uilabel alloc] initwithframe:cgrectmake(0.0f, 0.0f, 100.0f, 25.0f)]; mainlabel.text = [sectiontitles objectatindex:section]; mainlabel.backgroundcolor = [uicolor redcolor]; [headerview.contentview addsubview:mainlabel]; uilabel *secondlabel = [[uilabel alloc] initwithframe:cgre...