So i've changed the background property of my default view in my storyboard file to as many as the colours in the rainbow. The colour shows up along with my buttons nicely in Xcode, but when I actually RUN the app, the background is always the same, ugly, default grey colour that you start with a new Xcode project ("Hello World!").
I've searched up for the answer all over Google and to no avail. Am I doing something wrong or is it just a glitch? It might be also important to mention than i'm using Spritekit, and that this "view" is the only view in my Storyboard file, the default one. Should I change self.view to skView? Would that work?
Oh and also, when I manually try to change the background colour under viewDidLoad in my .m class by doing:
self.view.backgroundColor = [UIColor backgroundColor];
the background STILL doesn't change and is always the same default colour. Please help me... i'm desperate right now... there's no answers anywhere to be found. Thanks.
All Storyboard, all graphical answer:
Explanation: You should modify the Main.storyboard, select the View Controller, change View
in the Attribute Inspector, and apply a new Background color.
With exactly 0 lines of code, you should get this result:
Download project here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With