Assign double variable to mutable array

55 Views Asked by At

I can't figure out why variable number is not being assigned to array self.items. In the debugger it is showing value of NULL.

-(void)pushItem:(double)number{
    [self.items addObject:[[NSNumber alloc]initWithDouble:number]];

    if (self.items.lastObject == 0)
    {
        // ** need to add variable number to self.items array**
       
    }
}
0

There are 0 best solutions below