passforios/pass/Helpers/SearchBarScope.swift
Danny Moesch 296a3cbcfa Introduce enum for scope of search bar
This simplifies the handling of the indices in the search bar scope list, replaces strings as keys and allows a proper localization not breaking any logic.
2019-03-05 13:51:39 -08:00

21 lines
399 B
Swift

//
// SearchBarScope.swift
// pass
//
// Created by Danny Moesch on 05.03.19.
// Copyright © 2019 Bob Sun. All rights reserved.
//
enum SearchBarScope: Int, CaseIterable {
case current
case all
var localizedName: String {
switch self {
case .current:
return "Current".localize()
case .all:
return "All".localize()
}
}
}