-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFlickrDataStore.h
43 lines (26 loc) · 1.18 KB
/
FlickrDataStore.h
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
//
// FlickrDataStore.h
// FlickrWorld
//
// Created by Nadia Yudina on 3/20/14.
// Copyright (c) 2014 Nadia Yudina. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Photo+Methods.h"
#import "FlickrAPIClient.h"
@interface FlickrDataStore : NSObject
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (readonly, strong, nonatomic) NSFetchedResultsController *fetchedResultsController;
@property (strong, nonatomic) NSMutableArray *selectedAnnotations;
@property (strong, nonatomic) FlickrAPIClient *apiClient;
@property (nonatomic) BOOL doneFetch;
- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;
+(FlickrDataStore *) sharedDataStore;
//- (void)populateCoreDataWithPhotosWithCompletion: (void (^)(NSArray *))completionBlock;
//-(void)fetchDataWithCompletion: (void(^)(BOOL))completionBlock;
- (void)fetchDataWithCompletion:(void (^)(BOOL))completionBlock Failure: (void(^)(NSInteger))failureBlock;
- (void) cleanCoreData;
@end