Setting firstFrame to window.bounds not working


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.


Resolved- Had to make sure

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

was set before doing

CGRect firstFrame = self.window.bounds;