swift3 - Cosmicmind/Material: difference between NavigationController and ToolbarController -
i'm working on app written swift3 in xcode8. app implements cosmicmind-material-framework.
while working tried understand difference between navigationcontroller , toolbarcontroller is. (maybe can additionaly explain difference pagetabbarcontroller, too)
i don't because seems navigationcontroller contains toolbarcontroller. why should use both if can use navigationcontroller , prepare "toolbar-items" there.
shortly app:
- navigationdrawercontroller
- navigationcontroller
- site 1
- site 2
- pagetabbarcontroller
- site red
- site blue
- site yellow
- navigationcontroller
good question.
the main difference between navigationcontroller , toolbarcontroller navigationcontroller subclass of uinavigationcontroller , gives benefits of class while allowing customize , feel if toolbarcontroller.
the toolbarcontroller provides different type of flow, 1 transitions rootviewcontroller
using transition
method between view controllers. provides floating view controller can used in many ways.
like toolbarcontroller, pagetabbarcontroller inherits rootcontroller, provides same rootviewcontroller transitioning, default offers uipageviewcontroller initial rootviewcontroller.
so point of these different controllers? main design reason allow stack view controllers have these special controls in order create more complex navigational architectures without fuss of maintaining organization. each accessible within hierarchy while managing own code complexities. user has perception working seamlessly.
a example of cardtableview sample project, shows how layout cards within pagetabbarcontroller using tableviews have dynamic heights based on content. part, entire ui driven using persisted data powered graph.
hope helps :)
Comments
Post a Comment