ios - Changing a Table View Controller to a View Controller -
i have table view controller displays information using json. want change styling of app, , don't want have "table" view has now. whats easiest way change table view controller regular view controller, biggest problem have code uses tableview , dont know how work regular view controller.
i using storyboard tableviewcontroller thats linked controller called upcomingreleasesviewcontroller.
i want app:
to this:
my original answer assuming wanted convert uitableviewcontroller
uiviewcontroller
. looking @ screen snapshots, infer want switch uitableviewcontroller
uicollectionviewcontroller
(which ios 6 feature allows precisely want).
in case, change base class uicollectionviewcontroller
, , replace uitableviewdatasource
methods uicollectionviewdatasource
methods. , redesign scene using collection view controller.
see collection view programming guide more information. or see wwdc 2012 sessions introducing collection views or advanced collection views , building custom layouts.
if need support ios versions prior 6, have collection view style coding manually, putting image views on scroll view , using standard uiviewcontroller
. require more effort using collection view, can done.
original answer:
if view controller have table view on it, want add more controls scene? if so, change view controller's base class uitableviewcontroller
uiviewcontroller
, create new scene, add table view it, , specify table view's delegate , data source view controller:
also, make sure define iboutlet
table view (and if call tableview
, minimize coding changes needed).
if that, can convert uitableviewcontroller
based controller uiviewcontroller
minimal code changes.
Comments
Post a Comment