ios - UIView Subclassing and OOP -
i have app model array of menu objects containing information such title, images, method etc.
i create scroll view list of menu views, maybe picture, title , short description each menu.
to this, subclass uiview , create menuview instance each menu.
my question how should communicate model view. far can see can either:
- alloc , init menu item , layout sub views (means view sees model)
- alloc , init title, image , description (means view doesn't see model doesn't seem offer advantage)
- use delegation view asks information data source (seems segregated complicated)
any advice?
it sounds tableview best choice. subclass uitableviewcell , add objects can take advantage of tableview behavior make life easier.
a quick ios uitableview example
Comments
Post a Comment