假设有一个类:
@interface FooBar : NSObject
@property(readonly, getter = _getSpace) int** space;
@end
空间属性实现如下:
@implementation FooBar
int m_space1[256];
int m_space2[256];
int* m_space[2] = { m_space1, m_space2};
-(int **) _getSpace {
return m_space;
}
@end
那么使用以下方法更改 int[2][256] 数组是否合法:
FooBar * f = [[FooBar alloc] init];
f.space[1][120] = 0;
?