I’m using Nsoutline view with core data and array controller , how can i disable sorting array ?
I’m using Nsoutline view with core data and array controller , how can i
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.
An array controller or a tree controller? Usually, you’d use an array controller with a table view and a tree controller with an outline view.
Bind the
contentandselectionIndexPathsbindings of the outline view itself to the tree controller using key paths “arrangedObjects” and “selectionIndexPaths”, respectively. Don’t bind the outline view’ssortDescriptorsbinding to anything.Normally you don’t bind the outline view’s bindings directly. In that case, the outline view’s
content,selectionIndexPaths, andsortDescriptorsbindings are automatically bound to the tree controller to match the value binding of the columns. When you bind some of those yourself, it prevents this automatic binding. Since you’ve not boundsortDescriptorsand you’ve prevented the automatic binding, sorting is disabled.