ARC: “Pointer to non-const type 'id' with no explicit ownership”

后端 未结 2 1181
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 23:34

i am upgrading an iOS 4 project to use it with ARC with the sdk5. So i want to use the automatic refactor method for converting the code to use ARC. Unfortunately it does´t

相关标签:
2条回答
  • 2021-01-04 00:30

    id is a type, not an object. That means that id shouldn't be a pointer. Remove the * to fix it.

    for(id child in childObjectArray){
        [child removeParentGroupReferences];
    }
    
    0 讨论(0)
  • 2021-01-04 00:32

    Change id* to id. id is already defined as an object pointer.

    0 讨论(0)
提交回复
热议问题