There’s any chance to observe for order elements of array via KVO?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The NSKeyValueObserving protocol includes KVO notification methods for ordered to-many relationships (i.e. an NSMutableArray property of an object):
So you can see when an array’s elements change and then make sure they’re in the right order. You might also take a look at key-value validation, which could give you a way to make sure an array stays sorted.