Vito Barba Vito Barba - 1 year ago 81
iOS Question

Sort a relationship in cosmicmind graph's library

I'm using the graph library and I need sort a relationship from a relationship.subject field [ " idOrder " ] .
it's possible to do it?
And if IdOrder isn't a int but a date?

Answer Source

yes you can do this for Swift 3, which is currently in the development branch.

_ = ["T1"]).sorted { (a, b) -> Bool in
        return a.subject!["idOrder"] as! Int > b.subject!["idOrder"] as! Int

All the best :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download