ARC semantic issue - No visible @interface

ios, objective-c

Solution

Check if the method declaration is in `DocumentViewController`'s header file. It should be like this

- (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName;

Problem

I have 2 UIViewController classes - DocumentViewController and LibraryViewController. In the class DocumentViewController, I have the following code: ``` - (id)initWithURL:(NSString *)linkToPdf withFileName:(NSString *)fileName{ //some code goes here ... } ``` and I am trying to load the DocumentViewController class from LibraryViewController using the code: ``` 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]; ``` When I build, I get an error in the LibraryViewController class saying No visible @interface for 'DocumentViewController' declares the selector with initWithURL:withFileName: How do I fix this ?

Original source