ios - Issue Sorting Arrays With New Xcode Beta 4 In Swift -


I am using Xcode 6 Beta 2 and I have a custom class (show) with custom string variable is . I want to sort by a specific class string (show name) and I had to work it properly:

  currentShowsArray = sort (currentShowsArray) {$ 0.showName & lt; $ 1.showName}  

Now it does not work anymore and I think that '()' '[[Show]]' is not convertible for an error. P>

i can not be able to find new syntax

Beta 4 release notes :

code function now changes its first argument, and a new sorted function always returns a new archive.

then either

  currentShowsArray = sorted (currentShowsArray) {$ 0.showName & lt; $ 1.showName}  

Or, if the array is shaky,

  sort (& show show showr) {$ 0.showName & lt; $ 1.showName}  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -