Setting firstFrame to window.bounds not working


#1

When I do CGRect firstFrame = self.window.bounds, I am not getting a view with the red color. I get the background color of the window, instead of the background color of the view.


#2

Resolved- Had to make sure

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

was set before doing

CGRect firstFrame = self.window.bounds;