samedi 25 avril 2015

Changing the order of an array to be the same as another array SWIFT


I've seen this has been done before but can't seem to find it in swift. So I have two arrays, arrayA and arrayB. I want arrayB to sort itself into the same order a arrayA. So for example her is the arrays:

var arrayA = [1,2,3,4,5]
var arrayB = [5,4,3,2,1]

Thanks


Aucun commentaire:

Enregistrer un commentaire