crash while removing objects from NSMutableArray

前端 未结 6 538
遇见更好的自我
遇见更好的自我 2021-01-04 00:55

In my iphone project (ARC enabled) i have a nsmuatble array which contains some 5 managed objects (which are retrieved from core data ) and in some scenario i n

6条回答
  •  醉梦人生
    2021-01-04 01:33

    Remove all the things that you are doing and simply do like this

     [surveys removeAllObjects];
    

    As from the error that you are getting so maybe that Array is not NSmutableArray just normal array so thats why you can not remove object from It and you try to do so and app got crash

    check where you have initialised it if it is Mutable or not

    so as I said remove all that thing and use simple removeAllObject

提交回复
热议问题