sort fetched passwords by name
This commit is contained in:
parent
a4b26b3bd3
commit
cb333e7bfb
1 changed files with 3 additions and 1 deletions
|
|
@ -121,7 +121,9 @@ class PasswordStore {
|
|||
let passwordEntityFetch = NSFetchRequest<NSFetchRequestResult>(entityName: "PasswordEntity")
|
||||
do {
|
||||
let fetchedPasswordEntities = try context.fetch(passwordEntityFetch) as! [PasswordEntity]
|
||||
return fetchedPasswordEntities
|
||||
return fetchedPasswordEntities.sorted(by: { (p1, p2) -> Bool in
|
||||
return p1.name! < p2.name!;
|
||||
})
|
||||
} catch {
|
||||
fatalError("Failed to fetch employees: \(error)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue