TabBar viewControllers in IB: send custom init?

There are several tabs in my tabBarController application. Each of them has its own class viewController, the only difference of which is how the instance is initialized. Is there a way to get the interface builder to send various tab initialization custom options?

I am currently doing initialization in viewWillAppear, but for a number of reasons it would be advisable to do this in IB rather than in code.

Any suggestions?

thanks Kelso

+3
source share
2 answers

Builder , . IB, .

viewWillAppear:, awakeFromNib, , , , , .

, , initWithCoder: (. NSCoding ). , , , .

, , , . [[UIApplication sharedApplication] delegate] .

+3

, , IB, nib. , (, viewDidAppear ), , .

0

Source: https://habr.com/ru/post/1704320/


All Articles