我有两个UIViewController类-- DocumentViewController和LibraryViewController。
在DocumentViewController类中,我有以下代码:
- (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName{
//some code goes here ...
}我正在尝试使用以下代码从LibraryViewController加载DocumentViewController类:
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声明选择器:
我该如何解决这个问题?
发布于 2013-04-11 07:52:42
检查方法声明是否在DocumentViewController的头文件中。
- (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName;https://stackoverflow.com/questions/15938515
复制相似问题