ios - How to add the View below the TableView? -
how should add view
(imageview
) below uitableview
?
and view can scrolled uitableview
because tableitem
can expanded
you need implement uitableviewdelegate method
- (uiview *)tableview:(uitableview *)tableview viewforfooterinsection:(nsinteger)section
and return desired view (e.g. uilabel text you'd in footer) appropriate section of table.
somewhat below.
- (cgfloat)tableview:(uitableview *)tableview heightforfooterinsection:(nsinteger)section { return 30.0f; } - (uiview *)tableview:(uitableview *)tableview viewforfooterinsection:(nsinteger)section { uiview *sampleview = [[uiview alloc] init]; sampleview.frame = cgrectmake(x, y, width, height); sampleview.backgroundcolor = [uicolor blackcolor]; return sampleview; }
and include uitableviewdelegate protocol.
@interface testviewcontroller : uiviewcontroller <uitableviewdelegate>
Comments
Post a Comment