I need something like this:
@property (nonatomic, retain) int field[10][10];
but this code doesn\'t work. How to replace it? I need both se
It s pretty simple.
@interface MyClass
{
int _fields[10][10];
}
@property(readonly,nonatomic) int **fields;
@end
@implementation MyClass
- (int *)fields
{
return _fields;
}
@end
Use readonly in property as it is a fixed pointer, which you wont be changing, which doesn't mean that you can't modify the values in the array.