How do I connect a web view in the storyboard to an outlet in Xcode 5?

1.6k Views Asked by At

For some reason, I am not able to ctrl drag the web view I am trying to create into the .h file. I typed the code into the .h file. Now, I need to know how to connect the web view with the outlet I created. Most of the suggestions I have seen tell me to use the .xib file, however, I do not have a .xib. All of this is done in Xcode 5. As of now, if I try to run the app, the web view simply shows up as a plain white screen. If anyone has any ideas on how to connect the outlet with my web view, I would really appreciate it.

edit: Here is the code I used to make the outlet, is it incorrect?

IBOutlet UIWebView *myWebView;
1

There are 1 best solutions below

1
On

This is very strange, it shouldn't at all do this. but anyway, since you wrote the code, I believe you can now open the connections inspector (( the last tab of the inspectors window )) and ctrl drag from you connections inspector to your webview (( or vice-versa, i don't quite remember )). However, if this doesn't work, then you have a serious problem with your xcode buddy, try to solve it.