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).
Yeah, I had the same problem too. You should file a bug with Apple since this seems to be a common problem. I don't have the project I had the error anymore because I completely rewrote my app (again).
PM me with a message and I can give you a template that works in beta 8.
Hi,
I was solved a similar problem with dagamer34's help.
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.
Could someone please explain exactly what is described above? I tried step-by-step, and still get a EXCEPTION_ERROR with the following report:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x454060> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key webView.'
I don't understand why step #6 made the difference, but it is still not working for me. I have been unable to have a Tab Bar with a WebView in one of the tabs views. Am I missing something basic?
Could anyone please offer some explanation of code to achieve this 'simple' interface?
Find below the steps that I did (with the help of dagamer34) and it works.
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 (save)
5. Add to FirstViewController.h the IBOutlet UIWebView *webView;
6. Open up the MainWindow.xib, Select the Second Button, under the View Controller Identity in the Class type in FirstViewController. Save and close
7. Build and Go, select the Tab Bar called Second and it works
Hrmm ... I guess the SDK has changed ... because opening this with xcode 3.1.2 - hangs with the following error:-
2009-06-03 14:33:47.525 tabbar[47227:20b] Unknown class tabbarAppDelegate in Interface Builder file.
2009-06-03 14:33:47.549 tabbar[47227:20b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x5241b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'