objective c - What is the proper way to deal with changing a single UIView within a storyboard scene -
lets have scene includes uiview container on top half of screen, , uiview container on bottom half of screen , few buttons @ bottom of screen.
basically bottom container display static text while buttons across bottom change content of top container may include image, more buttons, or more text depending on button pressed on bottom. each time bottom button pressed top container transitioned new view flip bottom transition.
i have achieved purely programmatically, decided convert app storyboard file since makes producing rest of app faster , simpler, plus makes code not crazy mess.
my limited understanding of storyboards seems deduce need separate story board scene every uiview change, , apple's coding conventions storyboards seem imply should use new viewcontroller every time create new scene. adds bigger mess have.
is there better way of doing this? misunderstanding something? if not confused, there way make these scene , view controller duplication cleaner?
the storyboard editor makes difficult you're describing, because doesn't let edit freestanding views associated scene.
i suggest create separate nib (not storyboard) each of top-half views. these can exist separate storyboard. view controller (which instantiated storyboard) can load whichever nib needs when button pressed, , put view nib (the view controller's) top-level view.
Comments
Post a Comment