Skip to main content

objective c - Why am I getting an ARC error with this method? -


this here method im using display items on screen line

cgsize gameareasize = [controller gameareasize]; 

says receiver type controller2 instance message not declare method selector gameareasize

+(id)ship:(controller2*)controller { cgsize gameareasize = [controller gameareasize]; cgpoint center = cgpointmake(gameareasize.width/2, gameareasize.height/2); items2* item = [[items2 alloc] initat:center withradius:16 andimage:@"viper"]; [item setmovetopoint:center]; [item setspeed:.8]; } 

and after use [controller removeactor:item]; remove item off of screen says same thing not being able call removeactor automatic reference counting issue

objective c - why getting arc error method? - stack overflow

learn, share, build

each month, on 50 million developers come stack overflow learn, share knowledge, , build careers.

join world’s largest developer community.

sign up

this here method im using display items on screen line

cgsize gameareasize = [controller gameareasize]; 

says receiver type controller2 instance message not declare method selector gameareasize

+(id)ship:(controller2*)controller { cgsize gameareasize = [controller gameareasize]; cgpoint center = cgpointmake(gameareasize.width/2, gameareasize.height/2); items2* item = [[items2 alloc] initat:center withradius:16 andimage:@"viper"]; [item setmovetopoint:center]; [item setspeed:.8]; } 

and after use [controller removeactor:item]; remove item off of screen says same thing not being able call removeactor automatic reference counting issue

share|improve question
4  
this not arc issue - controller2 class not implement methods calling on it. – evan mulawski jul 7 '12 @ 1:09
    
@evan: relate arc. arc makes "undeclared selector" compile-time warnings errors -- needs see method signature in order know return value: stackoverflow.com/questions/9245317/… – josh caswell jul 7 '12 @ 7:55
    
possible duplicate of compiler warnings methods not found or not declared – josh caswell jul 7 '12 @ 7:55
    
@joshcaswell: arc may treat undeclared selector warnings errors, still undeclared selectors, means problem class not declare them. – evan mulawski jul 7 '12 @ 16:07
    
@evan: if implemented not declared (or compiler can't see declaration @ point), , arc turned off, code compile , run , question wouldn't exist. – josh caswell jul 7 '12 @ 17:18

your answer

 
discard

posting answer, agree privacy policy , terms of service.

browse other questions tagged or ask own question.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -