首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ARC语义问题-没有可见的@接口

ARC语义问题-没有可见的@接口
EN

Stack Overflow用户
提问于 2013-04-11 07:50:42
回答 1查看 6.7K关注 0票数 3

我有两个UIViewController类-- DocumentViewController和LibraryViewController。

在DocumentViewController类中,我有以下代码:

代码语言:javascript
运行
复制
- (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName{
     //some code goes here ... 
}

我正在尝试使用以下代码从LibraryViewController加载DocumentViewController类:

代码语言:javascript
运行
复制
DocumentViewController *documentViewController = [[DocumentViewController alloc] initWithURL:@"http://investor.google.com/pdf/2012Q4_google_earnings_slides.pdf" withFileName:@"Google Earnings Slides"];
[self presentViewController:documentViewController animated:NO completion:nil];

当我构建时,我在LibraryViewController类中得到一个错误,说No visible @interface for 'DocumentViewController‘使用initWithURL:withFileName声明选择器:

我该如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-11 07:52:42

检查方法声明是否在DocumentViewController的头文件中。

代码语言:javascript
运行
复制
- (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName;
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15938515

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档