Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Blog Reader iPhone App Viewing a Web Page Implementing a UIWebView

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.

1 Answer

Misha Shaposhnikov
Misha Shaposhnikov
8,718 Points

There could be several solutions:

  1. 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.

  2. Make sure you are using the right shortcut. (control + click and drag)

3.Make sure you are dragging between the @interface and @end lines.

Santiago Grufi
Santiago Grufi
1,988 Points

I have the same problem, the class is OK in the viewcontroller, I cant make the "drag blue line" connection. Im on mountain lion and xcode 5