Is it possible and how to change the left menu from ECSlidingViewController at runtime? I want to be able to change the language during runtime and this to affect all the views as well as the left menu items. What I noticed is that viewdidload event is executed only once when the left menu is shown for the first time.
Asked
Active
Viewed 117 times
-1
-
What does the documentation say? – nhgrif Feb 19 '14 at 00:50
-
here is one post about that menu http://kingscocoa.com/tutorials/slide-out-navigation/ – Lyubomir Velchev Feb 19 '14 at 00:51
-
And what in there have you tried? – nhgrif Feb 19 '14 at 00:52
-
I do not think that there is explicitly a way to load the menu at runtime while moving in between other views – Lyubomir Velchev Feb 19 '14 at 00:52
-
I can load the menu according to the selected language but only once. if I select different language while runtime the menu is not affected because it doesn't load every time - the viewdidload method isn't called – Lyubomir Velchev Feb 19 '14 at 00:54
1 Answers
0
If you want code to be executed more frequently than viewDidLoad
is called, then move it out of viewDidLoad
. viewWillAppear:
might be a decent option... or you can just put it in its own method and call it whenever you need it.

nhgrif
- 61,578
- 25
- 134
- 173
-
viewWillAppear is not executed as well when the left menu is shown. Also when you click to show the left menu, you do not have a reference to it so that you can call a method. – Lyubomir Velchev Feb 19 '14 at 00:59
-
Then, as I said, put it in its own method and call it when you need it... or hire a programmer. You've provided no details about your app, and I'm fresh out of tea leaves, so I can't tell you how best to implement this... but if you're only wanting to change the text based on language changes, you shouldn't need to change them every time the menu appears... – nhgrif Feb 19 '14 at 01:01