iOS 리소스 기능 모음 여기서 사용되는 path는 Asset(bundle)을 제외하면, applicationDocumentsDirectory 등을 포함한 full path여야 한다.
More...
#import <HIVEResource.h>
Inherits NSObject.
iOS 리소스 기능 모음 여기서 사용되는 path는 Asset(bundle)을 제외하면, applicationDocumentsDirectory 등을 포함한 full path여야 한다.
- Author
- seogjunkim
§ cachedImageFromURL:withGroup:()
+ (UIImage *) cachedImageFromURL: |
|
(NSURL*) |
url |
withGroup: |
|
(NSString*) |
groupName |
|
|
| |
URL을 통해 저장된 이미지를 얻어온다.
- Parameters
-
url | 이미지 URL |
groupName | 캐시 그룹을 지정한다, cachingImageFromURL에서 지정된 group을 경로로 사용한다. |
- Returns
- 캐시된 이미지 nil일경우 캐시된 이미지가 없음.
§ cachedimageListWithGroup:()
+ (NSArray< NSURL * > *) cachedimageListWithGroup: |
|
(NSString*) |
groupName |
|
URL을 통해 이미지를 다운받고 캐시한다.
- Parameters
-
groupName | 이미지를 저장할 캐시 그룹 지정한다. Caches/groupName 로 저장된다. |
- Returns
- 이미지목록을 얻어온다. 이미지 목록은 지정했던 URL이 전달된다.
§ cachingImageFromURL:withGroup:()
+ (void) cachingImageFromURL: |
|
(NSURL*) |
url |
withGroup: |
|
(NSString*) |
groupName |
|
|
| |
URL을 통해 이미지를 다운받고 캐시한다.
이미 다운되어있는 이미지는 다시 다운받지 않는다.
- Parameters
-
url | 이미지 URL |
groupName | 이미지를 저장할 캐시 폴더 이름을 지정한다. Caches/targetPath 로 저장된다. |
§ getBundle()
Hive SDK의 Asset bundle의 인스턴스를 가져옴 (iOS는 kHIVEResourceBundleName bundle에서)
- Returns
- Bundle*
§ isCachedImage:withGroup:()
+ (BOOL) isCachedImage: |
|
(NSURL*) |
url |
withGroup: |
|
(NSString*) |
groupName |
|
|
| |
URL을 넘겨받아 캐싱 이미지가 존재하는지 여부를 검사한다.
- Parameters
-
url | 제거할 이미지의 URL |
groupName | 이미지를 캐싱한 폴더 |
- Returns
- 이미지 존재시 YES, 아닐 시 NO
§ isExistFile:()
+ (BOOL) isExistFile: |
|
(NSString*) |
fileName |
|
파일 존재 여부 반환
- Parameters
-
- Returns
- 호출 결과
- Parameters
-
- Returns
- 호출 결과
§ openRawResource:()
+ (NSData *) openRawResource: |
|
(NSString*) |
name |
|
리소스 원본 파일을 연다.
main bundle에 있는 리소스 원본 파일을 연다.
- Parameters
-
- Returns
- 호출 결과
- Parameters
-
context | (android only) |
name | 파일명 |
- Returns
- 호출 결과
§ openRawResource:defType:()
리소스 원본 파일을 연다.
main bundle에 있는 리소스 원본 파일을 연다.
- Parameters
-
- Returns
- 호출 결과
- Parameters
-
context | (android only) |
name | 파일명 |
defType | 폴더명 |
- Returns
- 호출 결과
§ readFile:()
+ (NSString *) readFile: |
|
(NSString*) |
sourceFilePath |
|
데이터 파일을 읽어서 문자열로 반환
- Parameters
-
- Returns
- 호출 결과
- Parameters
-
- Returns
- 호출 결과
§ readFileAsStream:()
+ (NSString *) readFileAsStream: |
|
(NSInputStream*) |
is |
|
데이터 파일을 읽어서 문자열로 반환
- Parameters
-
- Returns
- 호출 결과
- Parameters
-
- Returns
- 호출 결과
§ readFileFromAssets:()
+ (NSString *) readFileFromAssets: |
|
(NSString*) |
sourceFilePath |
|
assets 파일을 읽어서 문자열로 반환
assets 파일을 읽어서 문자열로 반환 (iOS는 kHIVEResourceBundleName bundle에서)
- Parameters
-
sourceFilePath | assets 폴더의 파일 경로 |
- Returns
- 호출 결과
- Parameters
-
context | |
sourceFilePath | assets 폴더의 파일 경로 (ext 포함) |
- Returns
- 호출 결과
§ readXmlToJSON:()
+ (NSDictionary *) readXmlToJSON: |
|
(NSInputStream*) |
is |
|
XML 설정 정보를 읽어서 JSONObject 로 반환
XML 설정 정보를 읽어서 JSONObject 로 반환 android parser와 ios parser 결과가 같도록 수정.
- Parameters
-
- Returns
- JSON 출력 객체 (iOS NSDictionary)
2016.3.14 by seongjunkim
- Parameters
-
- Returns
- JSON 출력 객체 (iOS NSDictionary)
§ removeCachedImageWithURL:withGroup:()
+ (BOOL) removeCachedImageWithURL: |
|
(NSURL*) |
url |
withGroup: |
|
(NSString*) |
groupName |
|
|
| |
URL을 넘겨받아 캐싱 targetPath에서 이미지를 지운다.
- Parameters
-
url | 제거할 이미지의 URL |
groupName | 이미지를 캐싱한 폴더 |
- Returns
- 이미지 제거시 YES, 제거 실패시 NO
§ writeFile:contents:()
+ (BOOL) writeFile: |
|
(NSString*) |
targetFilePath |
contents: |
|
(NSString*) |
contents |
|
|
| |
문자열 데이터를 데이터 파일로 저장
- Parameters
-
targetFilePath | 데이터 파일 경로 |
contents | 문자열 데이터 |
- Returns
- 호출 결과 이미 파일이 존재하면 overwrite.
- Parameters
-
targetFilePAth | 데이터 파일 경로 |
contents | 문자열 데이터 |
- Returns
- 호출 결과 이미 파일이 존재하면 overwrite.
The documentation for this class was generated from the following files: