开发者

Remove an object in NSMutableArray?

开发者 https://www.devze.com 2023-01-13 05:22 出处:网络
I have a NSMutableArray like this: NSMutableArray *array =...; (array contain my custom object) NSMutableArray *toRemove = [array getObjectsToRemove];

I have a NSMutableArray like this:

NSMutableArray *array =...; (array contain my custom object)
NSMutableArray *toRemove = [array getObjectsToRemove];

But when I try to call removeObjectsInArray ( [array removeObjectsInArray:toRemove]; ) it breaks my app! Can anybody 开发者_运维知识库tell me how to solve my problem :(


I expect the error you are getting is "[NSMutableArray getObjectsToRemove] unrecognized selector sent to.."

NSMutableArray does not have such a method.

That's as far as I can answer without a bit more information, like the actual error message and the code for getObjectsToRemove (wherever it is defined).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号