Pretty new to iOS development - so this may be easier than I think.
Situation: When creating a new tab bar application, it creates a MainWindows.xib and a FirstView.xib
Problem: I want to put in a UIWebView in the First Tab and have written the code for it. I have seen plenty of Youtube Vids and tutorials, but they seem to load the UIViews into the MainWindows.xib - maybe an older version??
What I have done: I have named the IBOutlet - Home // IBOutlet UIWebView *Home; I have also told in the .m file where the UIWebview should go to once loaded (google.com) Now in interface builder if I select the first tab bar, I can see the "home" in my outlet section and I need to link that to my FirstView.
How do I do that??? when I clock on the circle, or control-click, it does not want to select the UIWebView in another .xi开发者_运维百科b file.
Any help is greatly appreciated.
Cheers Jeff
It does not seem to work - the class is in a different xib file, so I cant drag it across??
Open FirstView.xib in Interface Builder, from left pane in Objects list select View, open Utilities pane (3 icons with different view layouts, located in upper right corner of Xcode, it says View underneath, Utilities is on right). Switch to Identity inspector tab and change class to UIWebView. Then just add new outlet to FirstViewController and connect web view to Files owner .view outlet.
精彩评论