objective c - Ordered Sets and Core Data (NSOrderedSet) -


i have list of share prices properties datetime , value.

currently sorting share prices when fetching them using sort descriptor.

now, change code , store them in sorted order faster retrieve current share price (datetime = max).

i inserting share prices 1 one using

shareprice *priceitem= [nsentitydescription insertnewobjectforentityforname:@"shareprice" inmanagedobjectcontext:context];

how can sort share prices right after inserting them using sort descriptor on datetime?

or need convert nsmutableorderedset , use sortusingcomparator:?

thank you!

ordered property on coredata

mark ordered checkbox of property in coredata model.

also sure set coredata automatic migration in appdelegate (options dictionary when creating persistentstore). way coredata able make change without data lost.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -