F
F
FlooDwm2016-10-26 16:08:42
iOS
FlooDwm, 2016-10-26 16:08:42

How to make all viewController see the variable?

1) there is a value that one of the viewController receives, how to make it so that all viewController can see it??
2) And the very essence of the problem is that there is a viewController in it ViewContainer containing viewController2 how, when loading the first viewKotreller, pass a variable to the viewController2 which is in the viewContainer?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
one pavel, 2016-10-26
@FlooDwm

1) to forward in each controller handles
2) the word static is familiar?
3) use some singleton
4) maybe use DI

D
Dmitry Donkovtsev, 2016-10-27
@Demetriy

Use NSNotificationCenter or delegates, here is a general article .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question