[escher/*_view_controller] New ViewController::initView() method

Does some part of viewWillAppear().
This commit is contained in:
Ruben Dashyan
2019-01-31 15:03:31 +01:00
committed by EmilieNumworks
parent 9b0e2ac059
commit acecb92f75
14 changed files with 48 additions and 10 deletions

View File

@@ -96,6 +96,7 @@ void StackViewController::push(ViewController * vc, KDColor textColor, KDColor b
Frame frame = Frame(vc, textColor, backgroundColor, separatorColor);
/* Add the frame to the model */
pushModel(frame);
frame.viewController()->initView();
if (!m_isVisible) {
return;
}
@@ -156,6 +157,10 @@ View * StackViewController::view() {
return &m_view;
}
void StackViewController::initView() {
m_childrenFrame[0].viewController()->initView();
}
void StackViewController::viewWillAppear() {
/* Load the stack view */
for (int i = 0; i < m_numberOfChildren; i++) {