I have this code:
#import <UIKit/UIKit.h>
@interface slTableViewController : UITableViewController <UIWebViewDelegate> {
// IBOutlet UIWebView *webView;
}
@property (nonatomic, retain) IBOutlet UIWebView *webView;
@end
And I have this UIWebView that I am trying to connect to “file’s owner” (of course in XCode4, “file’s owner” doesn’t exist anymore, so I go from viewController to webView). As you can see in this image (http://imgur.com/4KQJX), “webView” is not a choice, only “view”.
This happens often, and I don’t know how to fix it. What is wrong, and how do I fix it?
UPDATED: code changed per suggestion
You should add
IBOutletwhen declaring the property:You can also get the
IBOutletgenerated automatically. When you are in Interface Builder, Open the Assistant Editor (red square in the screenshot) and control-drag the web view from Interface Builder to the.hfile.