How to get compiler warning when disabling IBOutlet

How can I get Xcode if the IBOutlet of one of my objects is not connected to anything in the NIB?

I can verify that the sockets are plugged in at run time by adding assert(ofEveryOutlet);to awakeFromNibor viewDidLoad. But this is not so useful or reliable as the compiler does the check for me.

+3
source share
2 answers

(Compiled) NIB files are downloaded and attached at runtime, so I don't think the compiler can check this. I think your best choice is the statements you have already proposed ...

0

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


All Articles