title: When selecting a row in table, it switches to blank screen
body: <p>in part of my app (storyboard) I have a table view with various rows, and when I select a row, an html file should be displayed. Instead when I select a row, I get a blank screen instead.</p>
  
  <p>I thought I needed another view controller after the tableview controller, but I get the same issue whether I have one or not. </p>
  
  <p>In my table controller .m file I have the following code:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>{</p>
  
  <pre><code>articleIndex = indexPath.row;
  
  WebView *selectedArticle = [[WebView alloc] initWithNibName:nil bundle:nil];
  [self.navigationController pushViewController:selectedArticle animated:YES];
  [selectedArticle release];
  </code></pre>
  
  <p>That is allowing me to select a row and the screen changes to a blank one, rather than loading the relevant html file.</p>
  
  <p>I have in my resources folder a .h and .m file as follows:</p>
  
  <p>webView.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "globals.h"
  @interface WebView : UIViewController{
  NSArray *articleNames;
  IBOutlet UIWebView *webView;
  }
  @property(nonatomic, retain)IBOutlet UIWebView *webView;
  @end
  </code></pre>
  
  <p>webView.m</p>
  
  <pre><code>#import "WebView.h"
  @implementation WebView
  @synthesize webView;
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
  self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  if (self) {
      // Custom initialization
  }
  return self;
  }
  
  - (void)didReceiveMemoryWarning
  {
  // Releases the view if it doesn't have a superview.
  [super didReceiveMemoryWarning];
  
  // Release any cached data, images, etc that aren't in use.
  }
  
  #pragma mark - View lifecycle
  
  - (void)viewDidLoad
  {
  [super viewDidLoad];
  
  articleNames = [[NSArray arrayWithObjects:
                   @"chapter1",
                   @"chapter2",
                   @"chapter3",
                   @"chapter4",
                   @"chapter5",
                   @"chapter6",
                   nil] retain];
  
  NSString *chapterName = [[NSString alloc] initWithString:[articleNames objectAtIndex:articleIndex]];
  
  NSString *path = [[NSBundle mainBundle] pathForResource:chapterName ofType:@"html"];
  NSURL *url = [NSURL fileURLWithPath:path];
  NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url];
  [webView loadRequest:urlRequest];
  
  [chapterName release];
  
  }
  
  - (void)viewDidUnload
  {
  [super viewDidUnload];
  // Release any retained subviews of the main view.
  // e.g. self.myOutlet = nil;
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
  // Return YES for supported orientations
  return YES;
  }
  
  @end
  </code></pre>
  
  <p>I can't see what I have done wrong here, any advice? I'm not sure how to get the html files to display or where I need to make changes to allow it. If I remove the HTML files from the project the app crashes so it's definitely loading them but for some reason not displaying...</p>