What is it and how do I use it? Why use ViewDIdLoad?

2

What is and what is ViewDIdLoad for?

    
asked by anonymous 25.10.2015 / 23:57

1 answer

4

This is a method of the UIViewController class that is called once the view hierarchy of the view controller is loaded, but is not yet visible on the screen.

This method is called once only during the view controller lifecycle. It is usually in it that the initialization of elements of the interface that were not done by nib / storyboard is done. That is, many times in the graphic editor we only define the basic structure of the interface, but the configuration of the elements (eg, color, font, text) is done by code in this method. We can also initialize other non-interface types.

    
26.10.2015 / 03:18