Objective-C Tab Bar crash problem,

Objective-C Tab Bar crash problem,

Problem:

Tab Bar Application with UIWebView


I have installed Beta 8 and I created a New Tab Bar Application but I am having issues in trying to make the UIWebView work.

1. Create a New Tab Bar Application
2. Open up the SecondView.xib in IB, remove label and add a UIWebView
3. Select the File’s Owner Icon and add an Outlet called webView, with type UIWebView
4. Connect from the File’s Owner webView Outlet to the UIWebView control
5. Add to FirstViewController.h the IBOutlet UIWebView *webView;
6. Build and Go, select the Tab Bar called Second and I receive __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__

If I go back and open the SecondView.xib file in IB and remove the webView Outlet connection to the UIWebView control, I can Build and Go and I select the Tab Barc called Second and the UIWebView shows up without error.

At this point I cannot figure out what I am doing wrong in order to automatically open the UIWebView to a specific URL. (I know I did not add the code to open up the URL yet because of my error above).

Thanks

Answer:

1.Make new project with “Tab Bar Application” template.
2.Add “IBOutlet id label;” In @Interface of “FirstViewController.h”.
3.Link label and File’s Owner In “SecondView.xib”.
4.Build and run, then termination will occur when select second tab.
|
5.Open “MainWindow.xib” and select second tab.
6.Change Class of View Controller (Second) to “FirstViewController”.
7.Build and run, then app will go well.