forked from fdzsergio/SFFocusViewLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSFManager.m
More file actions
37 lines (26 loc) · 841 Bytes
/
SFManager.m
File metadata and controls
37 lines (26 loc) · 841 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
26
27
28
29
30
31
32
33
34
35
36
37
//
// SFManager.m
// Example
//
// Created by Sergio Fernández Durán on 10/6/15.
// Copyright © 2015 Sergio Fernández. All rights reserved.
//
#import "SFManager.h"
#import "SFParser.h"
#import "SFResource.h"
@interface SFManager ()
@property (nonatomic, copy, readwrite) NSArray *resources;
@end
@implementation SFManager
- (void)loadResources
{
NSMutableArray *resources = [NSMutableArray array];
NSURL *fileURL = [[NSBundle mainBundle] URLForResource:@"Resources"
withExtension:@"plist"];
NSArray *resourcesFromPlist = [NSArray arrayWithContentsOfURL:fileURL];
for (NSDictionary *resourceDictionary in resourcesFromPlist) {
[resources addObject:[SFParser parseResourceFromDictionary:resourceDictionary]];
}
self.resources = resources;
}
@end