gpt4 book ai didi

ios - Web View 非法接口(interface)限定符

转载 作者:行者123 更新时间:2023-11-29 10:39:32 25 4
gpt4 key购买 nike

在 Xcode 中工作时,我试图将第二个 Web View 放入我的应用程序中,但不断收到非法接口(interface)限定符消息。

这是我的实现文件:

#import "XYZBonBonoftheDayViewController.h"

@interface XYZBonBonoftheDayViewController ()
@synthesize webView;
@end

@implementation XYZBonBonoftheDayViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
}
return self;
}

- (void)viewDidLoad
{
NSURL *url = [NSURL URLWithString:@"http://www.who.int/mediacentre/factsheets/fs103/en/"];
NSURLRequest *requestURL = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestURL];
[super viewDidLoad];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}

@end

...和我的界面文件:

#import <UIKit/UIKit.h>

@interface XYZBonBonoftheDayViewController : UIViewController

@property (nonatomic, strong) IBOutlet UIWebView *webView;

@end

如果有人能提供帮助,我将不胜感激!

提前干杯!


标题

最佳答案

我想你只需要删除

@synthesize webView;

请替换

@interface XYZBonBonoftheDayViewController ()
@synthesize webView;
@end

@interface XYZBonBonoftheDayViewController ()

@end

在您的实现文件中。

问候。

关于ios - Web View 非法接口(interface)限定符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25198640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com