forked from AAChartModel/AAChartKit-Swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PackageBundlePathLoader.swift
49 lines (44 loc) ยท 1.73 KB
/
PackageBundlePathLoader.swift
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// PackageBundlePathLoader.swift
// AAInfographicsDemo
//
// Created by An An on 2022/5/24.
// Copyright ยฉ 2022 An An. All rights reserved.
//*************** ...... SOURCE CODE ...... ***************
//***...................................................***
//*** https://github.com/AAChartModel/AAChartKit ***
//*** https://github.com/AAChartModel/AAChartKit-Swift ***
//***...................................................***
//*************** ...... SOURCE CODE ...... ***************
/*
* -------------------------------------------------------------------------------
*
* ๐ ๐ ๐ ๐ โโโ WARM TIPS!!! โโโ ๐ ๐ ๐ ๐
*
* Please contact me on GitHub,if there are any problems encountered in use.
* GitHub Issues : https://github.com/AAChartModel/AAChartKit-Swift/issues
* -------------------------------------------------------------------------------
* And if you want to contribute for this project, please contact me as well
* GitHub : https://github.com/AAChartModel
* StackOverflow : https://stackoverflow.com/users/12302132/codeforu
* JianShu : https://www.jianshu.com/u/f1e6753d4254
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
*
* -------------------------------------------------------------------------------
*/
import Foundation
class BundlePathLoader {
func path(
forResource name: String,
ofType fileType: String,
inDirectory subpath: String? = nil,
forLocalization localizationName: String? = nil
) -> String? {
return Bundle.module.path(
forResource: name,
ofType: fileType,
inDirectory: subpath,
forLocalization: localizationName
)
}
}