Wednesday, 15 February 2012

ios - viewForHeaderInSection is placing header above the tableView -



ios - viewForHeaderInSection is placing header above the tableView -

i overrided method viewforheaderinsection , realized default adds on top of uitableview, send of tableview. idea?

here code:

-(uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section{ uiimageview *imageview = [[uiimageview alloc] initwithimage:districtimage]; imageview.frame = cgrectmake(10,10,300,100); nslog(@"districtimage=%@",districtimage); homecoming imageview; }

edit

ok got scroll now:

self.tableview.tableheaderview = imageview;

my problem header big how can cut down it

-(cgfloat)tableview:(uitableview *)tableview heightforheaderinsection:(nsinteger)section{}

does not seem take effect.

just use

-(uiview *)tableview:(uitableview *)tableview viewforfooterinsection:(nsinteger)section

with same body should work

ios objective-c uitableview

No comments:

Post a Comment