title: How to create view from a nib file in xcode?
body: <p>I have the following code to create a view and put it in scrollview to allow paging<br>
  the code works fine however what I couldn't do is loading views from a nib file </p>
  
  <p>in other words 
  I want to use "initWithNibName" instead of "initWithFrame"?</p>
  
  <pre><code>   - (void)createPageWithColor:(UIColor *)color forPage:(int)page
       {
       UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 300,400)];
           newView.backgroundColor = color;
       [scrollView addSubview:newView];
      }
  </code></pre>
  
  <p>Thanks alot</p>