Note that there are some explanatory texts on larger screens.

plurals
  1. POARC error: receiver type for instance message does not declare a method with selector
    primarykey
    data
    text
    <p>I am getting this error that I can't figure out.</p> <blockquote> <p>error: Automatic Reference Counting Issue: Receiver type 'pageAppViewController' for instance message does not declare a method with selector 'createContentPages'</p> </blockquote> <p>I posted my code below. I do have a method called <code>createContentPages</code> in my class <code>pageAppViewController</code>. What does this mean and what is causing it?</p> <pre><code>// contentViewController.m #import "contentViewController.h" #import "pageAppViewController.h" @implementation contentViewController @synthesize theImageView, dataObject; @synthesize image; - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; //error occurs on this next line pageAppViewController *newContent = [[pageAppViewController alloc] init]; self.image = [newContent createContentPages]; [self.theImageView setImage: ((pageAppViewController *) [self.image objectAtIndex:0]) .images]; } error: Automatic Reference Counting Issue: Receiver type 'pageAppViewController' for instance message does not declare a method with selector 'createContentPages' // // pageAppViewController.m #import "pageAppViewController.h" @implementation pageAppViewController @synthesize pageController; @synthesize bookContent; @synthesize images; - (NSArray *) createContentPages { UIImage *zero = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"TitlePage.png"]]; UIImage *one = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"Page1.png"]]; UIImage *two = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"Page2.png"]]; UIImage *three = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"Page3.png"]]; UIImage *four = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"Page4.png"]]; UIImage *five = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"Page5.png"]]; NSMutableArray *pageContent = [[NSMutableArray alloc] init]; for (int i = 1; i &lt; 7; i++) { pageAppViewController *content = [[pageAppViewController alloc] init]; if (i == 1) { content.images = zero; [pageContent addObject:content]; } else if (i == 2) { content.images = one; [pageContent addObject:content]; } else if (i == 3) { content.images = two; [pageContent addObject:content]; } else if (i == 4) { content.images = three; [pageContent addObject:content]; } else if (i == 5) { content.images = four; [pageContent addObject:content]; } else if (i == 6) { content.images = five; [pageContent addObject:content]; } } bookContent = [[NSArray alloc] initWithArray: pageContent]; return bookContent; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload