swift how to sort array

Swift
var images : [imageFile] = []
images.sorted(by: { $0.fileID > $1.fileID })

Source

Also in Swift: