diff --git a/escher/include/escher/stack_view_controller.h b/escher/include/escher/stack_view_controller.h index 5c8439075..9a899751b 100644 --- a/escher/include/escher/stack_view_controller.h +++ b/escher/include/escher/stack_view_controller.h @@ -14,6 +14,7 @@ public: /* Push creates a new StackView and adds it */ void push(ViewController * vc); + void updateTitle(); void pop(); diff --git a/escher/src/stack_view_controller.cpp b/escher/src/stack_view_controller.cpp index 11481e2c7..b4dc3497b 100644 --- a/escher/src/stack_view_controller.cpp +++ b/escher/src/stack_view_controller.cpp @@ -87,11 +87,15 @@ const char * StackViewController::title() const { } } +void StackViewController::updateTitle() { + m_view.popStack(); + m_view.pushStack(m_children[m_numberOfChildren-1]->title()); +} + void StackViewController::push(ViewController * vc) { m_view.pushStack(vc->title()); m_children[m_numberOfChildren++] = vc; setupActiveViewController(); - //vc->setParentResponder(this); } void StackViewController::pop() {