ios - Keep a static graphic always fixed on screen while changing uiviews in xcode -
is there way have static graphic on screen doesn't move when pushing / popping view controllers?
the best way can think describe tab bar.
if have tab on tab bar has multiple pages swipe left/right, can view these different pages, , main content area moves, while tab bar stays fixed , doesn't swipe in/out along content.
i want similar custom toolbar have created , added view, slides out previous viewcontroller , slides in new view controller.
is there way keep fixed on screen doesn't move.
hope makes sense!
yes, can using container view.
it new xcode, doesn't have widespread use navigation controllers , tab bars do, works similarly.
basically, create new uiviewcontroller instance in storyboard, , put container view inside view controller, filling entire view controller. there, right click on view controller flow starts (probably either tab bar controller or navigation controller) select embed, , target container view in new view controller. finally, you'll need change initial view controller (the arrow points first view controller app should load) new uiviewcontroller has container view.
if run app @ point, should notice no difference @ all. entire app running inside container view of new view controller. now, can uiimageview new view controller anywhere want. since new view controller doesn't ever go away, uiimageview put inside stay there no matter container view showing.
hope helps!
note: should add if program uses modal transitions, cause flow exit new view controller , it's container view well, similar how affects tab bar controllers.
Comments
Post a Comment