ios - UITableViewController inside UIScrollView with Horizontal Paging -
this situation:
i need horizontal scrolling, , table views inside every page. news app, should display news different categories, when scrolled in 1 horizontal direction, , inside 1 category should display 30 news, vertically scrollable, of course.
i have done need, but...
i have following scenario:
uinavigationcontroller |__ uiviewcontroller, contains scrollview , pagecontrol |__ uitableviewcontroller, holds data in rows, , displayed inside parent, scollview
i know not ideal solution, @ least works. base, used apple's code , tutorial pagescroll found on link. instead of simple viewcontroller add scrollview, used tableviewcontroller, add tablecontroller.tableview scrollview.
i know, also, adding tableviews inside scrollview sort of adding car inside truck , driving car, couldn't find more reasonable way of doing same thing.
so, need thoughts how can accomplished using other approach. use storyboarding , ios 5 this, , seems (and looks) messy right now.
thanks in advance, lot.
i did similar few months ago, , this:
uinavigationcontroller
uiviewcontroller
uiscrollview
uiviewcontroller
uitableview
inside (i use because hateuitablewviewcontroller
)
i followed apple's documentation creating custom containers. there great video in wwdc 2011 video's section if not mistaken. can proudly code clean , simple understand.
answer 1.0
the 1 thing is, did managed proper orientation handling of tableview, without hack, or don't use it?
no, in case didn't, sure have been able without problem. see, of problems come when [self.view addsubview:newviewcontroller.view];
. add uiview
, logic of rotation handled newviewcontroller , not in controller uiview
be.
the other thing is, if i'm gonna try implement, say, gridview or that, ipad, orientation handling , animations become ugly.
i implemented in project , quite easy implement once understand what's going on:
- i used
uiviewcontroller
uitableview
goodiesdequeuereusablecellwithidentifier:
, creation of section's titles, table's headers , footers, etc. figure no matteruiscrollview
uitableview
going more optimized.uitableviewcell's
used holder 3 squares, each 1 being picture. (my application showcase of pictures)
Comments
Post a Comment