title: "[[UIScreen mainScreen] bounds]" returns null?
body: <p>When I try to get the bounds of the main screen with <code>[[UIScreen mainScreen] bounds]</code>, it returns null. I've tried with <code>[[UIScreen applicationFrame] bounds]</code> as well, still returns null. </p>
  
  <p>The strange part is; if I do <code>NSLog(@"%@", [UIScreen mainScreen]);</code> it prints out the correct bounds, albeit I have no idea how to parse it, if it's even possible.  </p>
  
  <p>Here's the relevant code:</p>
  
  <pre><code>-(void)loadView {
      [super loadView];
      CGRect pagingFrame = [[UIScreen mainScreen] bounds]; 
      NSLog(@"%@", [[UIScreen mainScreen] bounds]); //prints null for me
      NSLog(@"Width of original frame = %d", pagingFrame.size.width); //prints out 0
      pagingFrame.origin.x -= pagingXOrigin;
      pagingFrame.size.width += pagingWidthAdd;
      NSLog(@"Width of adjusted frame = %d", pagingFrame.size.width); //still prints out 0
      pagingScrollView = [[UIScrollView alloc] initWithFrame:pagingFrame];
      pagingScrollView.pagingEnabled = YES;
      pagingScrollView.backgroundColor = [UIColor blackColor];
      pagingScrollView.contentSize = CGSizeMake(pagingFrame.size.width * [self imageCount], pagingFrame.size.height);
      self.view = pagingScrollView;
      //Initialize sets
      recycled = [[NSMutableSet alloc] init];
      visible = [[NSMutableSet alloc] init];
      [self tilePages];
  }
  </code></pre>
  
  <p><code>pagingScrollView</code> is declared in the header file, as is recycled and visible.  </p>
  
  <p>I'm using Xcode 3 and iOS SDK 4.1.</p>
  
  <p>I'm sure there's a very simple solution for this, however I'm still very much a rookie at Objective-C, and thus I cannot solve it.</p>
  
  <p>Thanks</p>