ios - Is it better to embed a view controller or add a subview? -
for example, if required uitableview
appear beneath additional content in view, best practice either:
- add
uitableview
subview, or - add container view holding
uitableviewcontroller
?
as far know, both provide same user experience, interested know method considered best practice?
the general rule ios, iphone/ipod touch form factor, should have 1 view controller on screen @ given time. case can think of when want violate guideline when have subview has lot of logic built in it, , subview needs included in multiple other views. example, popover should have own view controller because might need shown in conjunction multiple other view controllers.
in case, suggest adding uitableview subview unless (1) table view has lot of logic isn’t related of parent view controller, or (2) need display same table view in part of app.
Comments
Post a Comment