1.在写如下方法时:
void drawShapes (id shapes[], int count)
{
for (int i = 0; i < count; i++) {
id shape = shapes[i];
[shape draw];
}
}
出现错误:
Must explicitly describe intended ownership of an object array parameter
解决方法:
在工程的Build Settings里面把Automatic Reference Counting这个选项关掉(即设为NO),自己管理内存就不会有这个错误了