2
votes

hi the following block of code is giving me error

-(void) addObserver: (id <ObserverDelegate>*) observer {    
     [self.queue addObject: observer]; //ERROR ON THIS LINE
}

error is saying 'implicit conversion of an indirect pointer to an objective c pointer to id is disallowed with arc

my .h file

-(void) addObserver: (id <ObserverDelegate>*) observer;
@property(nonatomic, assign) NSMutableArray* queue;

Compile error on this line [self.queue addObject: observer];

1

1 Answers

4
votes

Why are you using a pointer to an id for the observer parameter? Why not just have id<ObserverDelegate>?