我越来越不可见@interface为 'NSObject的' 声明选择 'viewDidLoad中' 上 行:因为没有明显的@interface声明选择错误
[super viewDidLoad];
[_viewWeb loadRequest:requestObj];
[super didReceiveMemoryWarning];
UIViewControllerHUB.m
#import "UIViewControllerHUB.h"
@interface UIViewControllerHUB()
@property (strong, nonatomic) NSMutableArray *subItems;
@end
@implementation UIViewControllerHUB
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *fullURL = @"http://conecode.com";
NSURL *url = [NSURL URLWithString:fullURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[_viewWeb loadRequest:requestObj];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
UIViewControllerHUB.h
#import <Foundation/Foundation.h>
@interface UIViewControllerHUB : NSObject
@property (strong, nonatomic) IBOutlet UIView *viewWeb;
@end
我该如何解决这个问题?
上述的一切现在已经解决。
新的错误如下:
现在得到的UIView“为不可见@interface'声明选择 '的loadRequest:' 在线
[_viewWeb loadRequest:requestObj];
如果您有新问题,请提出新问题;不要编辑旧的。在这种情况下,您可能需要先查看代码并在其他问题中查找类似的错误。 –
你的代码是正确的。唯一的问题是你的LoadRequest方法不是UIView方法,而是UIWebView方法。我已经更新了答案,请遵循。 –