forked from zmian/SwiftPasscodeLock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions.swift
More file actions
25 lines (19 loc) · 710 Bytes
/
Copy pathFunctions.swift
File metadata and controls
25 lines (19 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// Functions.swift
// PasscodeLock
//
// Created by Yanko Dimitrov on 8/28/15.
// Copyright © 2015 Yanko Dimitrov. All rights reserved.
//
import Foundation
func localizedStringFor(key: String, comment: String) -> String {
let name = "PasscodeLock"
let defaultString = NSLocalizedString(key, tableName: name, bundle: Bundle(for: PasscodeLock.self), comment: comment)
return NSLocalizedString(key, tableName: name, bundle: Bundle.main, value: defaultString, comment: comment)
}
func bundleForResource(name: String, ofType type: String) -> Bundle {
if Bundle.main.path(forResource: name, ofType: type) != nil {
return .main
}
return Bundle(for: PasscodeLock.self)
}