i'm from poland so sorry for word mistakes.
what's my problem?
i've got array with representation of red color, its:
NSMutableArray *redColor = [[NSMutableArray alloc] initWithCapacity: 255];
i've got FOR loop for fill my array value: 0.
for (int i=0; i < 255; i++) {
[redArray insertObject:[NSNumber numberWithInt:0] atIndex:i];
}
ok it's fine. but problem is when i want to add value in next FOR loop.
for (NSUInteger ii = 0 ; ii < width * height ; ++ii)
{
//blablabla
[redArray insertObject:[NSNumber numberWithInt:redArray[ii]+1] atIndex:redArray[ii]];
//example: ii=4
//insertObject: (numberWithInt:value for redArray[4] + 1) at index:4.
//it's not work because i've got ERROR: Subscript requiers size of interface
//"NSMutableArray", which is non constant in non-fragile ABI.
}
how i can fix it? i don't know how to easy increment value in NSMutableArray cell.
thanks you for help, it's my first post here.
regards, Tomek