Where can I find the code for the UIView Goes?

I changed the background color for the single view app, but I would like to know where is the code that is affected by this change?

Replies

The code "goes nowhere", I mean there is no explicit code in your source files.


When loading the view, during viewDidload, the configutaion defined in IB is read in the class (ino backgroundColor property). And display is set appropriately.

Ok, so what if I changed the background color of the Main.storyboard view? will I be able to change the code somewhere?

I want to use code similar to this, but I want to change the view color not the label:


myLabel.textColor = UIColor(red: (160/255.0), green: (97/255.0), blue: (5/255.0), alpha: 1.0)

//The values should be between 0 to 1

The UIViewController’s view is available in the “view” property. So in your viewDidLoad you could set


self.view.backgroundColor = ...