Welcome to the Treehouse Community
Looking to learn something new?
Problem Creating The IBOutlet
So I have created IBOutlets in the past just by dragging from storyboard to code, as we do in this video. But this time it just isn't working.
I'm dragging from the web view straight to the WebViewController.h code and when I move the line over to the code, nothing happens. It won't take it. I don't know if maybe something isn't linked up right or what.
Misha Shaposhnikov8,718 Points
There could be several solutions:
In the storyboard Identity inspector, make sure your web view controller is assigned to the custom class that you created, which should be a child of UIViewController. I recommend going to the storyboard hierarchy and manually choosing the web view controller, which should have a yellow object icon next to it, from under the Web View Controller scene. Then, open the Utilities tab and choose Identity inspector. The very first section is called Custom Class. Make sure your custom class is chosen from the drop-down menu, or if it isn't there, type in the name manually.
Make sure you are using the right shortcut. (control + click and drag)
3.Make sure you are dragging between the @interface and @end lines.