38 |
39 | /* The photo to return information for. */
40 | @property (nonatomic, copy) NSString *photo_id; /* (Required) */
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Photos/FKFlickrPhotosGetContext.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrPhotosGetContext.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrPhotosGetContextError) {
14 | FKFlickrPhotosGetContextError_PhotoNotFound = 1, /* The photo id passed was not a valid photo id, or was the id of a photo that the calling user does not have permission to view. */
15 | FKFlickrPhotosGetContextError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrPhotosGetContextError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrPhotosGetContextError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrPhotosGetContextError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrPhotosGetContextError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrPhotosGetContextError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrPhotosGetContextError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrPhotosGetContextError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns next and previous photos for a photo in a photostream.
29 |
30 | When either the previous of next photo is unavailable, the element is still returned, but contains id="0"
31 |
32 | Response:
33 |
34 |
36 |
38 |
39 | */
40 | @interface FKFlickrPhotosGetContext : NSObject
41 |
42 | /* The id of the photo to fetch the context for. */
43 | @property (nonatomic, copy) NSString *photo_id; /* (Required) */
44 |
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Photos/People/FKFlickrPhotosPeopleGetList.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrPhotosPeopleGetList.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrPhotosPeopleGetListError) {
14 | FKFlickrPhotosPeopleGetListError_PhotoNotFound = 1, /* The photo id passed was not a valid photo id. */
15 | FKFlickrPhotosPeopleGetListError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrPhotosPeopleGetListError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrPhotosPeopleGetListError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrPhotosPeopleGetListError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrPhotosPeopleGetListError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrPhotosPeopleGetListError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrPhotosPeopleGetListError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrPhotosPeopleGetListError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Get a list of people in a given photo.
29 |
30 | x, y, w and h correspond to the coordinates of the "bounding box" around a person in a photo. Since these co-ordinates are optional, these elements may not be present for every person.
31 |
32 | Response:
33 |
34 |
35 |
38 |
39 |
40 | */
41 | @interface FKFlickrPhotosPeopleGetList : NSObject
42 |
43 | /* The id of the photo to get a list of people for. */
44 | @property (nonatomic, copy) NSString *photo_id; /* (Required) */
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Places/FKFlickrPlacesGetPlaceTypes.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrPlacesGetPlaceTypes.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrPlacesGetPlaceTypesError) {
14 | FKFlickrPlacesGetPlaceTypesError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrPlacesGetPlaceTypesError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrPlacesGetPlaceTypesError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrPlacesGetPlaceTypesError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrPlacesGetPlaceTypesError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrPlacesGetPlaceTypesError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrPlacesGetPlaceTypesError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrPlacesGetPlaceTypesError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | Fetches a list of available place types for Flickr.
28 |
29 |
30 | Response:
31 |
32 |
33 | neighbourhood
34 | locality
35 | county
36 | region
37 | country
38 | continent
39 |
40 |
41 | */
42 | @interface FKFlickrPlacesGetPlaceTypes : NSObject
43 |
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Push/FKFlickrPushGetTopics.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrPushGetTopics.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrPushGetTopicsError) {
14 | FKFlickrPushGetTopicsError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrPushGetTopicsError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrPushGetTopicsError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrPushGetTopicsError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrPushGetTopicsError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrPushGetTopicsError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrPushGetTopicsError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrPushGetTopicsError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | All the different flavours of anteater.
28 |
29 | (this method is experimental and may change)
30 |
31 |
32 | Response:
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | */
42 | @interface FKFlickrPushGetTopics : NSObject
43 |
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Push/FKFlickrPushGetTopics.m:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrPushGetTopics.m
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrPushGetTopics.h"
12 |
13 | @implementation FKFlickrPushGetTopics
14 |
15 |
16 |
17 | - (BOOL) needsLogin {
18 | return NO;
19 | }
20 |
21 | - (BOOL) needsSigning {
22 | return NO;
23 | }
24 |
25 | - (FKPermission) requiredPerms {
26 | return -1;
27 | }
28 |
29 | - (NSString *) name {
30 | return @"flickr.push.getTopics";
31 | }
32 |
33 | - (BOOL) isValid:(NSError **)error {
34 | BOOL valid = YES;
35 | NSMutableString *errorDescription = [[NSMutableString alloc] initWithString:@"You are missing required params: "];
36 |
37 | if(error != NULL) {
38 | if(!valid) {
39 | NSDictionary *userInfo = @{NSLocalizedDescriptionKey: errorDescription};
40 | *error = [NSError errorWithDomain:FKFlickrKitErrorDomain code:FKErrorInvalidArgs userInfo:userInfo];
41 | }
42 | }
43 | return valid;
44 | }
45 |
46 | - (NSDictionary *) args {
47 | NSMutableDictionary *args = [NSMutableDictionary dictionary];
48 |
49 | return [args copy];
50 | }
51 |
52 | - (NSString *) descriptionForError:(NSInteger)error {
53 | switch(error) {
54 | case FKFlickrPushGetTopicsError_InvalidAPIKey:
55 | return @"Invalid API Key";
56 | case FKFlickrPushGetTopicsError_ServiceCurrentlyUnavailable:
57 | return @"Service currently unavailable";
58 | case FKFlickrPushGetTopicsError_WriteOperationFailed:
59 | return @"Write operation failed";
60 | case FKFlickrPushGetTopicsError_FormatXXXNotFound:
61 | return @"Format \"xxx\" not found";
62 | case FKFlickrPushGetTopicsError_MethodXXXNotFound:
63 | return @"Method \"xxx\" not found";
64 | case FKFlickrPushGetTopicsError_InvalidSOAPEnvelope:
65 | return @"Invalid SOAP envelope";
66 | case FKFlickrPushGetTopicsError_InvalidXMLRPCMethodCall:
67 | return @"Invalid XML-RPC Method Call";
68 | case FKFlickrPushGetTopicsError_BadURLFound:
69 | return @"Bad URL found";
70 |
71 | default:
72 | return @"Unknown error code";
73 | }
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Reflection/FKFlickrReflectionGetMethods.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrReflectionGetMethods.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrReflectionGetMethodsError) {
14 | FKFlickrReflectionGetMethodsError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrReflectionGetMethodsError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrReflectionGetMethodsError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrReflectionGetMethodsError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrReflectionGetMethodsError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrReflectionGetMethodsError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrReflectionGetMethodsError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrReflectionGetMethodsError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | Returns a list of available flickr API methods.
28 |
29 |
30 | Response:
31 |
32 |
33 | flickr.blogs.getList
34 | flickr.blogs.postPhoto
35 | flickr.contacts.getList
36 | flickr.contacts.getPublicList
37 |
38 |
39 | */
40 | @interface FKFlickrReflectionGetMethods : NSObject
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetClusterPhotos.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetClusterPhotos.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetClusterPhotosError) {
14 | FKFlickrTagsGetClusterPhotosError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrTagsGetClusterPhotosError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrTagsGetClusterPhotosError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrTagsGetClusterPhotosError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrTagsGetClusterPhotosError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrTagsGetClusterPhotosError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrTagsGetClusterPhotosError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrTagsGetClusterPhotosError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | Returns the first 24 photos for a given tag cluster
28 |
29 |
30 |
31 |
32 | */
33 | @interface FKFlickrTagsGetClusterPhotos : NSObject
34 |
35 | /* The tag that this cluster belongs to. */
36 | @property (nonatomic, copy) NSString *tag; /* (Required) */
37 |
38 | /* The top three tags for the cluster, separated by dashes (just like the url). */
39 | @property (nonatomic, copy) NSString *cluster_id; /* (Required) */
40 |
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetClusters.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetClusters.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetClustersError) {
14 | FKFlickrTagsGetClustersError_TagClusterNotFound = 1, /* The tag was invalid or no cluster exists for that tag. */
15 | FKFlickrTagsGetClustersError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrTagsGetClustersError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrTagsGetClustersError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrTagsGetClustersError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrTagsGetClustersError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrTagsGetClustersError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrTagsGetClustersError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrTagsGetClustersError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Gives you a list of tag clusters for the given tag.
29 |
30 |
31 | Response:
32 |
33 |
34 |
35 | farm
36 | animals
37 | cattle
38 |
39 |
40 | green
41 | landscape
42 | countryside
43 |
44 |
45 |
46 | */
47 | @interface FKFlickrTagsGetClusters : NSObject
48 |
49 | /* The tag to fetch clusters for. */
50 | @property (nonatomic, copy) NSString *tag; /* (Required) */
51 |
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetHotList.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetHotList.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetHotListError) {
14 | FKFlickrTagsGetHotListError_InvalidPeriod = 1, /* The specified period was not understood. */
15 | FKFlickrTagsGetHotListError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrTagsGetHotListError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrTagsGetHotListError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrTagsGetHotListError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrTagsGetHotListError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrTagsGetHotListError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrTagsGetHotListError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrTagsGetHotListError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns a list of hot tags for the given period.
29 |
30 |
31 | Response:
32 |
33 |
34 | northerncalifornia
35 | top20
36 | keychain
37 | zb
38 | selfportraittuesday
39 | jan06
40 |
41 |
42 | */
43 | @interface FKFlickrTagsGetHotList : NSObject
44 |
45 | /* The period for which to fetch hot tags. Valid values are day
and week
(defaults to day
). */
46 | @property (nonatomic, copy) NSString *period;
47 |
48 | /* The number of tags to return. Defaults to 20. Maximum allowed value is 200. */
49 | @property (nonatomic, copy) NSString *count;
50 |
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetListPhoto.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetListPhoto.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetListPhotoError) {
14 | FKFlickrTagsGetListPhotoError_PhotoNotFound = 1, /* The photo id passed was not a valid photo id. */
15 | FKFlickrTagsGetListPhotoError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrTagsGetListPhotoError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrTagsGetListPhotoError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrTagsGetListPhotoError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrTagsGetListPhotoError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrTagsGetListPhotoError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrTagsGetListPhotoError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrTagsGetListPhotoError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Get the tag list for a given photo.
29 |
30 | For an explanation of the tag
element, please read the tags documentation.
31 |
32 | Response:
33 |
34 |
35 |
36 | tag1
38 | tag2
40 |
41 |
42 |
43 | */
44 | @interface FKFlickrTagsGetListPhoto : NSObject
45 |
46 | /* The id of the photo to return tags for. */
47 | @property (nonatomic, copy) NSString *photo_id; /* (Required) */
48 |
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetListUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetListUser.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetListUserError) {
14 | FKFlickrTagsGetListUserError_UserNotFound = 1, /* The user NSID passed was not a valid user NSID and the calling user was not logged in.
15 | */
16 | FKFlickrTagsGetListUserError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
17 | FKFlickrTagsGetListUserError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
18 | FKFlickrTagsGetListUserError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
19 | FKFlickrTagsGetListUserError_FormatXXXNotFound = 111, /* The requested response format was not found. */
20 | FKFlickrTagsGetListUserError_MethodXXXNotFound = 112, /* The requested method was not found. */
21 | FKFlickrTagsGetListUserError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
22 | FKFlickrTagsGetListUserError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
23 | FKFlickrTagsGetListUserError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
24 |
25 | };
26 |
27 | /*
28 |
29 | Get the tag list for a given user (or the currently logged in user).
30 |
31 |
32 | Response:
33 |
34 |
35 |
36 | gull
37 | tag1
38 | tag2
39 | tags
40 | test
41 |
42 |
43 |
44 | */
45 | @interface FKFlickrTagsGetListUser : NSObject
46 |
47 | /* The NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed. */
48 | @property (nonatomic, copy) NSString *user_id;
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetListUserRaw.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetListUserRaw.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetListUserRawError) {
14 | FKFlickrTagsGetListUserRawError_UserNotFound = 1, /* The calling user was not logged in. */
15 | FKFlickrTagsGetListUserRawError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrTagsGetListUserRawError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrTagsGetListUserRawError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrTagsGetListUserRawError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrTagsGetListUserRawError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrTagsGetListUserRawError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrTagsGetListUserRawError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrTagsGetListUserRawError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Get the raw versions of a given tag (or all tags) for the currently logged-in user.
29 |
30 |
31 | Response:
32 |
33 |
34 |
35 |
36 | foo
37 | Foo
38 | f:oo
39 |
40 |
41 |
42 |
43 | */
44 | @interface FKFlickrTagsGetListUserRaw : NSObject
45 |
46 | /* The tag you want to retrieve all raw versions for. */
47 | @property (nonatomic, copy) NSString *tag;
48 |
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Tags/FKFlickrTagsGetRelated.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTagsGetRelated.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTagsGetRelatedError) {
14 | FKFlickrTagsGetRelatedError_TagNotFound = 1, /* The tag argument was missing. */
15 | FKFlickrTagsGetRelatedError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrTagsGetRelatedError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrTagsGetRelatedError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrTagsGetRelatedError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrTagsGetRelatedError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrTagsGetRelatedError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrTagsGetRelatedError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrTagsGetRelatedError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns a list of tags 'related' to the given tag, based on clustered usage analysis.
29 |
30 |
31 | Response:
32 |
33 |
34 | england
35 | thames
36 | tube
37 | bigben
38 | uk
39 |
40 |
41 |
42 | */
43 | @interface FKFlickrTagsGetRelated : NSObject
44 |
45 | /* The tag to fetch related tags for. */
46 | @property (nonatomic, copy) NSString *tag; /* (Required) */
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Test/FKFlickrTestEcho.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTestEcho.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTestEchoError) {
14 | FKFlickrTestEchoError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrTestEchoError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrTestEchoError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrTestEchoError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrTestEchoError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrTestEchoError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrTestEchoError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrTestEchoError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | A testing method which echo's all parameters back in the response.
28 |
29 |
30 | Response:
31 |
32 | echo
33 | bar
34 |
35 | */
36 | @interface FKFlickrTestEcho : NSObject
37 |
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Test/FKFlickrTestEcho.m:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTestEcho.m
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrTestEcho.h"
12 |
13 | @implementation FKFlickrTestEcho
14 |
15 |
16 |
17 | - (BOOL) needsLogin {
18 | return NO;
19 | }
20 |
21 | - (BOOL) needsSigning {
22 | return NO;
23 | }
24 |
25 | - (FKPermission) requiredPerms {
26 | return -1;
27 | }
28 |
29 | - (NSString *) name {
30 | return @"flickr.test.echo";
31 | }
32 |
33 | - (BOOL) isValid:(NSError **)error {
34 | BOOL valid = YES;
35 | NSMutableString *errorDescription = [[NSMutableString alloc] initWithString:@"You are missing required params: "];
36 |
37 | if(error != NULL) {
38 | if(!valid) {
39 | NSDictionary *userInfo = @{NSLocalizedDescriptionKey: errorDescription};
40 | *error = [NSError errorWithDomain:FKFlickrKitErrorDomain code:FKErrorInvalidArgs userInfo:userInfo];
41 | }
42 | }
43 | return valid;
44 | }
45 |
46 | - (NSDictionary *) args {
47 | NSMutableDictionary *args = [NSMutableDictionary dictionary];
48 |
49 | return [args copy];
50 | }
51 |
52 | - (NSString *) descriptionForError:(NSInteger)error {
53 | switch(error) {
54 | case FKFlickrTestEchoError_InvalidAPIKey:
55 | return @"Invalid API Key";
56 | case FKFlickrTestEchoError_ServiceCurrentlyUnavailable:
57 | return @"Service currently unavailable";
58 | case FKFlickrTestEchoError_WriteOperationFailed:
59 | return @"Write operation failed";
60 | case FKFlickrTestEchoError_FormatXXXNotFound:
61 | return @"Format \"xxx\" not found";
62 | case FKFlickrTestEchoError_MethodXXXNotFound:
63 | return @"Method \"xxx\" not found";
64 | case FKFlickrTestEchoError_InvalidSOAPEnvelope:
65 | return @"Invalid SOAP envelope";
66 | case FKFlickrTestEchoError_InvalidXMLRPCMethodCall:
67 | return @"Invalid XML-RPC Method Call";
68 | case FKFlickrTestEchoError_BadURLFound:
69 | return @"Bad URL found";
70 |
71 | default:
72 | return @"Unknown error code";
73 | }
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Test/FKFlickrTestLogin.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTestLogin.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTestLoginError) {
14 | FKFlickrTestLoginError_SSLIsRequired = 95, /* SSL is required to access the Flickr API. */
15 | FKFlickrTestLoginError_InvalidSignature = 96, /* The passed signature was invalid. */
16 | FKFlickrTestLoginError_MissingSignature = 97, /* The call required signing but no signature was sent. */
17 | FKFlickrTestLoginError_LoginFailedOrInvalidAuthToken = 98, /* The login details or auth token passed were invalid. */
18 | FKFlickrTestLoginError_UserNotLoggedInOrInsufficientPermissions = 99, /* The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions. */
19 | FKFlickrTestLoginError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
20 | FKFlickrTestLoginError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
21 | FKFlickrTestLoginError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
22 | FKFlickrTestLoginError_FormatXXXNotFound = 111, /* The requested response format was not found. */
23 | FKFlickrTestLoginError_MethodXXXNotFound = 112, /* The requested method was not found. */
24 | FKFlickrTestLoginError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
25 | FKFlickrTestLoginError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
26 | FKFlickrTestLoginError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
27 |
28 | };
29 |
30 | /*
31 |
32 | A testing method which checks if the caller is logged in then returns their username.
33 |
34 |
35 | Response:
36 |
37 |
38 | Bees
39 |
40 |
41 |
42 | */
43 | @interface FKFlickrTestLogin : NSObject
44 |
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Test/FKFlickrTestNull.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrTestNull.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrTestNullError) {
14 | FKFlickrTestNullError_SSLIsRequired = 95, /* SSL is required to access the Flickr API. */
15 | FKFlickrTestNullError_InvalidSignature = 96, /* The passed signature was invalid. */
16 | FKFlickrTestNullError_MissingSignature = 97, /* The call required signing but no signature was sent. */
17 | FKFlickrTestNullError_LoginFailedOrInvalidAuthToken = 98, /* The login details or auth token passed were invalid. */
18 | FKFlickrTestNullError_UserNotLoggedInOrInsufficientPermissions = 99, /* The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions. */
19 | FKFlickrTestNullError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
20 | FKFlickrTestNullError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
21 | FKFlickrTestNullError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
22 | FKFlickrTestNullError_FormatXXXNotFound = 111, /* The requested response format was not found. */
23 | FKFlickrTestNullError_MethodXXXNotFound = 112, /* The requested method was not found. */
24 | FKFlickrTestNullError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
25 | FKFlickrTestNullError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
26 | FKFlickrTestNullError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
27 |
28 | };
29 |
30 | /*
31 |
32 | Null test
33 |
34 |
35 |
36 |
37 | */
38 | @interface FKFlickrTestNull : NSObject
39 |
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsGetGroup.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsGetGroup.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsGetGroupError) {
14 | FKFlickrUrlsGetGroupError_GroupNotFound = 1, /* The NSID specified was not a valid group. */
15 | FKFlickrUrlsGetGroupError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrUrlsGetGroupError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrUrlsGetGroupError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrUrlsGetGroupError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrUrlsGetGroupError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrUrlsGetGroupError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrUrlsGetGroupError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrUrlsGetGroupError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns the url to a group's page.
29 |
30 |
31 | Response:
32 |
33 |
34 |
35 | */
36 | @interface FKFlickrUrlsGetGroup : NSObject
37 |
38 | /* The NSID of the group to fetch the url for. */
39 | @property (nonatomic, copy) NSString *group_id; /* (Required) */
40 |
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsGetUserPhotos.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsGetUserPhotos.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsGetUserPhotosError) {
14 | FKFlickrUrlsGetUserPhotosError_UserNotFound = 1, /* The NSID specified was not a valid user. */
15 | FKFlickrUrlsGetUserPhotosError_NoUserSpecified = 2, /* No user_id was passed and the calling user was not logged in. */
16 | FKFlickrUrlsGetUserPhotosError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
17 | FKFlickrUrlsGetUserPhotosError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
18 | FKFlickrUrlsGetUserPhotosError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
19 | FKFlickrUrlsGetUserPhotosError_FormatXXXNotFound = 111, /* The requested response format was not found. */
20 | FKFlickrUrlsGetUserPhotosError_MethodXXXNotFound = 112, /* The requested method was not found. */
21 | FKFlickrUrlsGetUserPhotosError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
22 | FKFlickrUrlsGetUserPhotosError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
23 | FKFlickrUrlsGetUserPhotosError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
24 |
25 | };
26 |
27 | /*
28 |
29 | Returns the url to a user's photos.
30 |
31 |
32 | Response:
33 |
34 |
35 |
36 | */
37 | @interface FKFlickrUrlsGetUserPhotos : NSObject
38 |
39 | /* The NSID of the user to fetch the url for. If omitted, the calling user is assumed. */
40 | @property (nonatomic, copy) NSString *user_id;
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsGetUserProfile.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsGetUserProfile.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsGetUserProfileError) {
14 | FKFlickrUrlsGetUserProfileError_UserNotFound = 1, /* The NSID specified was not a valid user. */
15 | FKFlickrUrlsGetUserProfileError_NoUserSpecified = 2, /* No user_id was passed and the calling user was not logged in. */
16 | FKFlickrUrlsGetUserProfileError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
17 | FKFlickrUrlsGetUserProfileError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
18 | FKFlickrUrlsGetUserProfileError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
19 | FKFlickrUrlsGetUserProfileError_FormatXXXNotFound = 111, /* The requested response format was not found. */
20 | FKFlickrUrlsGetUserProfileError_MethodXXXNotFound = 112, /* The requested method was not found. */
21 | FKFlickrUrlsGetUserProfileError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
22 | FKFlickrUrlsGetUserProfileError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
23 | FKFlickrUrlsGetUserProfileError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
24 |
25 | };
26 |
27 | /*
28 |
29 | Returns the url to a user's profile.
30 |
31 |
32 | Response:
33 |
34 |
35 |
36 | */
37 | @interface FKFlickrUrlsGetUserProfile : NSObject
38 |
39 | /* The NSID of the user to fetch the url for. If omitted, the calling user is assumed. */
40 | @property (nonatomic, copy) NSString *user_id;
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsLookupGallery.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsLookupGallery.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsLookupGalleryError) {
14 | FKFlickrUrlsLookupGalleryError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
15 | FKFlickrUrlsLookupGalleryError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
16 | FKFlickrUrlsLookupGalleryError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
17 | FKFlickrUrlsLookupGalleryError_FormatXXXNotFound = 111, /* The requested response format was not found. */
18 | FKFlickrUrlsLookupGalleryError_MethodXXXNotFound = 112, /* The requested method was not found. */
19 | FKFlickrUrlsLookupGalleryError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
20 | FKFlickrUrlsLookupGalleryError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
21 | FKFlickrUrlsLookupGalleryError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
22 |
23 | };
24 |
25 | /*
26 |
27 | Returns gallery info, by url.
28 |
29 | This is the same format returned by flickr.galleries.getInfo.
30 |
31 | Response:
32 |
33 |
37 | Cat Pictures I've Sent To Kevin Collins
38 |
39 |
40 |
41 | */
42 | @interface FKFlickrUrlsLookupGallery : NSObject
43 |
44 | /* The gallery's URL. */
45 | @property (nonatomic, copy) NSString *url; /* (Required) */
46 |
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsLookupGroup.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsLookupGroup.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsLookupGroupError) {
14 | FKFlickrUrlsLookupGroupError_GroupNotFound = 1, /* The passed URL was not a valid group page or photo pool url. */
15 | FKFlickrUrlsLookupGroupError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrUrlsLookupGroupError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrUrlsLookupGroupError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrUrlsLookupGroupError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrUrlsLookupGroupError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrUrlsLookupGroupError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrUrlsLookupGroupError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrUrlsLookupGroupError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns a group NSID, given the url to a group's page or photo pool.
29 |
30 |
31 | Response:
32 |
33 |
34 | FlickrCentral
35 |
36 |
37 | */
38 | @interface FKFlickrUrlsLookupGroup : NSObject
39 |
40 | /* The url to the group's page or photo pool. */
41 | @property (nonatomic, copy) NSString *url; /* (Required) */
42 |
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Model/Generated/Urls/FKFlickrUrlsLookupUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKFlickrUrlsLookupUser.h
3 | // FlickrKit
4 | //
5 | // Generated by FKAPIBuilder.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 | // DO NOT MODIFY THIS FILE - IT IS MACHINE GENERATED
9 |
10 |
11 | #import "FKFlickrAPIMethod.h"
12 |
13 | typedef NS_ENUM(NSInteger, FKFlickrUrlsLookupUserError) {
14 | FKFlickrUrlsLookupUserError_UserNotFound = 1, /* The passed URL was not a valid user profile or photos url. */
15 | FKFlickrUrlsLookupUserError_InvalidAPIKey = 100, /* The API key passed was not valid or has expired. */
16 | FKFlickrUrlsLookupUserError_ServiceCurrentlyUnavailable = 105, /* The requested service is temporarily unavailable. */
17 | FKFlickrUrlsLookupUserError_WriteOperationFailed = 106, /* The requested operation failed due to a temporary issue. */
18 | FKFlickrUrlsLookupUserError_FormatXXXNotFound = 111, /* The requested response format was not found. */
19 | FKFlickrUrlsLookupUserError_MethodXXXNotFound = 112, /* The requested method was not found. */
20 | FKFlickrUrlsLookupUserError_InvalidSOAPEnvelope = 114, /* The SOAP envelope send in the request could not be parsed. */
21 | FKFlickrUrlsLookupUserError_InvalidXMLRPCMethodCall = 115, /* The XML-RPC request document could not be parsed. */
22 | FKFlickrUrlsLookupUserError_BadURLFound = 116, /* One or more arguments contained a URL that has been used for abuse on Flickr. */
23 |
24 | };
25 |
26 | /*
27 |
28 | Returns a user NSID, given the url to a user's photos or profile.
29 |
30 |
31 | Response:
32 |
33 |
34 | Stewart
35 |
36 |
37 | */
38 | @interface FKFlickrUrlsLookupUser : NSObject
39 |
40 | /* The url to the user's profile or photos page. */
41 | @property (nonatomic, copy) NSString *url; /* (Required) */
42 |
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Network/FKDUReachability.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKDUReachability.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 30/05/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 | #import
10 |
11 | @interface FKDUReachability : NSObject
12 |
13 | + (BOOL) isConnected;
14 | + (BOOL) isOffline; // just the inverse of isConnected
15 |
16 | + (NSError *) buildOfflineErrorMessage;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Network/FKFlickrNetworkOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKNetworkOperation.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 06/06/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 | #import "FKDataTypes.h"
10 | #import "FKDUConcurrentOperation.h"
11 | #import "FKDUDiskCache.h"
12 | #import "FKDUnetworkOperation.h"
13 | #import "FKFlickrAPIMethod.h"
14 |
15 | @interface FKFlickrNetworkOperation : FKDUNetworkOperation
16 |
17 | - (id) initWithAPIMethod:(NSString *)api arguments:(NSDictionary *)args maxAgeMinutes:(FKDUMaxAge)maxAge diskCache:(id)diskCache completion:(FKAPIRequestCompletion)completion;
18 |
19 | - (id) initWithAPIMethod:(id)method maxAgeMinutes:(FKDUMaxAge)maxAge diskCache:(id)diskCache completion:(FKAPIRequestCompletion)completion;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Network/FKImageUploadNetworkOperation.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKImageUploadNetworkOperation.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 06/06/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 | #import "FKDUNetworkOperation.h"
10 | #import "FKDataTypes.h"
11 |
12 | @interface FKImageUploadNetworkOperation : FKDUNetworkOperation
13 | @property (nonatomic, assign, readonly) CGFloat uploadProgress;
14 |
15 | - (id) initWithImage:(DUImage *)image arguments:(NSDictionary *)args completion:(FKAPIImageUploadCompletion)completion;
16 |
17 | #if TARGET_OS_IOS
18 | - (id) initWithAssetURL:(NSURL *)assetURL arguments:(NSDictionary *)args completion:(FKAPIImageUploadCompletion)completion;
19 | #endif
20 |
21 | @end
22 |
23 | @interface FKImageUploadNetworkOperation (ImageSerialization)
24 | + (NSData *) jpegSerialzation:(DUImage *)image;
25 | @end
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Network/FKURLBuilder.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKURLBuilder.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 28/05/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 | typedef enum {
10 | FKHttpMethodGET = 0,
11 | FKHttpMethodPOST
12 | } FKHttpMethod;
13 |
14 | @interface FKURLBuilder : NSObject
15 |
16 | #pragma mark - URL Encryption
17 |
18 | - (NSURL *) oauthURLFromBaseURL:(NSURL *)inURL method:(FKHttpMethod)method params:(NSDictionary *)params;
19 |
20 | #pragma mark - Create query string from args and sign it
21 |
22 | - (NSString *) signedQueryStringFromParameters:(NSDictionary *)params;
23 |
24 | #pragma mark - Args as array
25 |
26 | - (NSDictionary *) signedArgsFromParameters:(NSDictionary *)params method:(FKHttpMethod)method url:(NSURL *)url;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Network/FKUploadRespone.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKUploadRespone.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 06/06/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 |
10 | @interface FKUploadRespone : NSObject
11 |
12 | @property (nonatomic, strong, readonly) NSString *photoID;
13 | @property (nonatomic, strong, readonly) NSError *error;
14 |
15 | - (id) initWithData:(NSData *)data;
16 |
17 | - (BOOL) parse;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Utilities/FKOFHMACSha1Base64.h:
--------------------------------------------------------------------------------
1 | //
2 | // OFUtilities.h
3 | //
4 | // Copyright (c) 2009-2011 Lukhnos D. Liu (http://lukhnos.org)
5 | //
6 | // Permission is hereby granted, free of charge, to any person
7 | // obtaining a copy of this software and associated documentation
8 | // files (the "Software"), to deal in the Software without
9 | // restriction, including without limitation the rights to use,
10 | // copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | // copies of the Software, and to permit persons to whom the
12 | // Software is furnished to do so, subject to the following
13 | // conditions:
14 | //
15 | // The above copyright notice and this permission notice shall be
16 | // included in all copies or substantial portions of the Software.
17 | //
18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 | // OTHER DEALINGS IN THE SOFTWARE.
26 | //
27 |
28 | #import
29 |
30 | NSString *FKOFHMACSha1Base64(NSString *inKey, NSString *inMessage);
31 |
--------------------------------------------------------------------------------
/Demo/Pods/FlickrKit/Classes/Utilities/FKUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // FKUtilitis.h
3 | // FlickrKit
4 | //
5 | // Created by David Casserly on 29/05/2013.
6 | // Copyright (c) 2013 DevedUp Ltd. All rights reserved. http://www.devedup.com
7 | //
8 |
9 | #import
10 |
11 | #pragma mark - MD5
12 |
13 | NSString *FKMD5FromString(NSString *string);
14 |
15 | #pragma mark - URL Escaped Strings
16 |
17 | NSString *FKEscapedURLString(NSString *string);
18 | NSString *FKEscapedURLStringPlus(NSString *string);
19 |
20 | #pragma mark - Unique ID
21 |
22 | NSString *FKGenerateUUID(void);
23 |
24 | #pragma mark - Query Strings
25 |
26 | NSDictionary *FKQueryParamDictionaryFromQueryString(NSString *queryString);
27 |
28 | NSDictionary *FKQueryParamDictionaryFromURL(NSURL *url);
29 |
--------------------------------------------------------------------------------
/Demo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - FlickrKit (1.0.8)
3 | - Masonry (1.0.2)
4 | - SDWebImage (3.8.2):
5 | - SDWebImage/Core (= 3.8.2)
6 | - SDWebImage/Core (3.8.2)
7 |
8 | DEPENDENCIES:
9 | - FlickrKit
10 | - Masonry
11 | - SDWebImage
12 |
13 | SPEC CHECKSUMS:
14 | FlickrKit: beadf880a10ccaa2f13666d04112324fe08815e2
15 | Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
16 | SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c
17 |
18 | PODFILE CHECKSUM: bcbfbae8ac66cbe8951860e7c3d75cb17f1a813c
19 |
20 | COCOAPODS: 1.0.1
21 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint+Private.h
3 | // Masonry
4 | //
5 | // Created by Nick Tymchenko on 29/04/14.
6 | // Copyright (c) 2014 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 |
11 | @protocol MASConstraintDelegate;
12 |
13 |
14 | @interface MASConstraint ()
15 |
16 | /**
17 | * Whether or not to check for an existing constraint instead of adding constraint
18 | */
19 | @property (nonatomic, assign) BOOL updateExisting;
20 |
21 | /**
22 | * Usually MASConstraintMaker but could be a parent MASConstraint
23 | */
24 | @property (nonatomic, weak) id delegate;
25 |
26 | /**
27 | * Based on a provided value type, is equal to calling:
28 | * NSNumber - setOffset:
29 | * NSValue with CGPoint - setPointOffset:
30 | * NSValue with CGSize - setSizeOffset:
31 | * NSValue with MASEdgeInsets - setInsets:
32 | */
33 | - (void)setLayoutConstantWithValue:(NSValue *)value;
34 |
35 | @end
36 |
37 |
38 | @interface MASConstraint (Abstract)
39 |
40 | /**
41 | * Sets the constraint relation to given NSLayoutRelation
42 | * returns a block which accepts one of the following:
43 | * MASViewAttribute, UIView, NSValue, NSArray
44 | * see readme for more details.
45 | */
46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
47 |
48 | /**
49 | * Override to set a custom chaining behaviour
50 | */
51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
52 |
53 | @end
54 |
55 |
56 | @protocol MASConstraintDelegate
57 |
58 | /**
59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example
60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
61 | */
62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
63 |
64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * An immutable tuple which stores the view and the related NSLayoutAttribute.
13 | * Describes part of either the left or right hand side of a constraint equation
14 | */
15 | @interface MASViewAttribute : NSObject
16 |
17 | /**
18 | * The view which the reciever relates to. Can be nil if item is not a view.
19 | */
20 | @property (nonatomic, weak, readonly) MAS_VIEW *view;
21 |
22 | /**
23 | * The item which the reciever relates to.
24 | */
25 | @property (nonatomic, weak, readonly) id item;
26 |
27 | /**
28 | * The attribute which the reciever relates to
29 | */
30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
31 |
32 | /**
33 | * Convenience initializer.
34 | */
35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
36 |
37 | /**
38 | * The designated initializer.
39 | */
40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
41 |
42 | /**
43 | * Determine whether the layoutAttribute is a size attribute
44 | *
45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
46 | */
47 | - (BOOL)isSizeAttribute;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 | #import "MASConstraint.h"
11 | #import "MASLayoutConstraint.h"
12 | #import "MASUtilities.h"
13 |
14 | /**
15 | * A single constraint.
16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
17 | */
18 | @interface MASViewConstraint : MASConstraint
19 |
20 | /**
21 | * First item/view and first attribute of the NSLayoutConstraint
22 | */
23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
24 |
25 | /**
26 | * Second item/view and second attribute of the NSLayoutConstraint
27 | */
28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
29 |
30 | /**
31 | * initialises the MASViewConstraint with the first part of the equation
32 | *
33 | * @param firstViewAttribute view.mas_left, view.mas_width etc.
34 | *
35 | * @return a new view constraint
36 | */
37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
38 |
39 | /**
40 | * Returns all MASViewConstraints installed with this view as a first item.
41 | *
42 | * @param view A view to retrieve constraints for.
43 | *
44 | * @return An array of MASViewConstraints.
45 | */
46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
26 |
27 |
28 | @end
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Demo/Pods/Masonry/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 | - (MASViewAttribute *)mas_topLayoutGuideTop {
19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
20 | }
21 | - (MASViewAttribute *)mas_topLayoutGuideBottom {
22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
23 | }
24 |
25 | - (MASViewAttribute *)mas_bottomLayoutGuide {
26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
27 | }
28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop {
29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
30 | }
31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
33 | }
34 |
35 |
36 |
37 | @end
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Olivier Poitrey rs@dailymotion.com
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface NSData (ImageContentType)
9 |
10 | /**
11 | * Compute the content type for an image data
12 | *
13 | * @param data the input data
14 | *
15 | * @return the content type as string (i.e. image/jpeg, image/gif)
16 | */
17 | + (NSString *)sd_contentTypeForImageData:(NSData *)data;
18 |
19 | @end
20 |
21 |
22 | @interface NSData (ImageContentTypeDeprecated)
23 |
24 | + (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`");
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import "NSData+ImageContentType.h"
7 |
8 |
9 | @implementation NSData (ImageContentType)
10 |
11 | + (NSString *)sd_contentTypeForImageData:(NSData *)data {
12 | uint8_t c;
13 | [data getBytes:&c length:1];
14 | switch (c) {
15 | case 0xFF:
16 | return @"image/jpeg";
17 | case 0x89:
18 | return @"image/png";
19 | case 0x47:
20 | return @"image/gif";
21 | case 0x49:
22 | case 0x4D:
23 | return @"image/tiff";
24 | case 0x52:
25 | // R as RIFF for WEBP
26 | if ([data length] < 12) {
27 | return nil;
28 | }
29 |
30 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
31 | if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) {
32 | return @"image/webp";
33 | }
34 |
35 | return nil;
36 | }
37 | return nil;
38 | }
39 |
40 | @end
41 |
42 |
43 | @implementation NSData (ImageContentTypeDeprecated)
44 |
45 | + (NSString *)contentTypeForImageData:(NSData *)data {
46 | return [self sd_contentTypeForImageData:data];
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | * (c) Jamie Pinkham
5 | *
6 | * For the full copyright and license information, please view the LICENSE
7 | * file that was distributed with this source code.
8 | */
9 |
10 | #import
11 |
12 | #ifdef __OBJC_GC__
13 | #error SDWebImage does not support Objective-C Garbage Collection
14 | #endif
15 |
16 | #if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0
17 | #error SDWebImage doesn't support Deployment Target version < 5.0
18 | #endif
19 |
20 | #if !TARGET_OS_IPHONE
21 | #import
22 | #ifndef UIImage
23 | #define UIImage NSImage
24 | #endif
25 | #ifndef UIImageView
26 | #define UIImageView NSImageView
27 | #endif
28 | #else
29 |
30 | #import
31 |
32 | #endif
33 |
34 | #ifndef NS_ENUM
35 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
36 | #endif
37 |
38 | #ifndef NS_OPTIONS
39 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
40 | #endif
41 |
42 | #if OS_OBJECT_USE_OBJC
43 | #undef SDDispatchQueueRelease
44 | #undef SDDispatchQueueSetterSementics
45 | #define SDDispatchQueueRelease(q)
46 | #define SDDispatchQueueSetterSementics strong
47 | #else
48 | #undef SDDispatchQueueRelease
49 | #undef SDDispatchQueueSetterSementics
50 | #define SDDispatchQueueRelease(q) (dispatch_release(q))
51 | #define SDDispatchQueueSetterSementics assign
52 | #endif
53 |
54 | extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image);
55 |
56 | typedef void(^SDWebImageNoParamsBlock)();
57 |
58 | extern NSString *const SDWebImageErrorDomain;
59 |
60 | #define dispatch_main_sync_safe(block)\
61 | if ([NSThread isMainThread]) {\
62 | block();\
63 | } else {\
64 | dispatch_sync(dispatch_get_main_queue(), block);\
65 | }
66 |
67 | #define dispatch_main_async_safe(block)\
68 | if ([NSThread isMainThread]) {\
69 | block();\
70 | } else {\
71 | dispatch_async(dispatch_get_main_queue(), block);\
72 | }
73 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m:
--------------------------------------------------------------------------------
1 | //
2 | // SDWebImageCompat.m
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 11/12/12.
6 | // Copyright (c) 2012 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "SDWebImageCompat.h"
10 |
11 | #if !__has_feature(objc_arc)
12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
13 | #endif
14 |
15 | inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) {
16 | if (!image) {
17 | return nil;
18 | }
19 |
20 | if ([image.images count] > 0) {
21 | NSMutableArray *scaledImages = [NSMutableArray array];
22 |
23 | for (UIImage *tempImage in image.images) {
24 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)];
25 | }
26 |
27 | return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
28 | }
29 | else {
30 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
31 | CGFloat scale = 1;
32 | if (key.length >= 8) {
33 | NSRange range = [key rangeOfString:@"@2x."];
34 | if (range.location != NSNotFound) {
35 | scale = 2.0;
36 | }
37 |
38 | range = [key rangeOfString:@"@3x."];
39 | if (range.location != NSNotFound) {
40 | scale = 3.0;
41 | }
42 | }
43 |
44 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
45 | image = scaledImage;
46 | }
47 | return image;
48 | }
49 | }
50 |
51 | NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain";
52 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import
12 | #import "SDWebImageCompat.h"
13 |
14 | @interface UIImage (ForceDecode)
15 |
16 | + (UIImage *)decodedImageWithImage:(UIImage *)image;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 |
11 | @protocol SDWebImageOperation
12 |
13 | - (void)cancel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+GIF.h
3 | // LBGIFImage
4 | //
5 | // Created by Laurin Brandner on 06.01.12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (GIF)
12 |
13 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name;
14 |
15 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data;
16 |
17 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (MultiFormat)
12 |
13 | + (UIImage *)sd_imageWithData:(NSData *)data;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 | #import "SDWebImageManager.h"
11 |
12 | @interface UIView (WebCacheOperation)
13 |
14 | /**
15 | * Set the image load operation (storage in a UIView based dictionary)
16 | *
17 | * @param operation the operation
18 | * @param key key for storing the operation
19 | */
20 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key;
21 |
22 | /**
23 | * Cancel all operations for the current UIView and key
24 | *
25 | * @param key key for identifying the operations
26 | */
27 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key;
28 |
29 | /**
30 | * Just remove the operations corresponding to the current UIView and key without cancelling them
31 | *
32 | * @param key key for identifying the operations
33 | */
34 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Demo/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "UIView+WebCacheOperation.h"
10 | #import "objc/runtime.h"
11 |
12 | static char loadOperationKey;
13 |
14 | @implementation UIView (WebCacheOperation)
15 |
16 | - (NSMutableDictionary *)operationDictionary {
17 | NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey);
18 | if (operations) {
19 | return operations;
20 | }
21 | operations = [NSMutableDictionary dictionary];
22 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
23 | return operations;
24 | }
25 |
26 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key {
27 | [self sd_cancelImageLoadOperationWithKey:key];
28 | NSMutableDictionary *operationDictionary = [self operationDictionary];
29 | [operationDictionary setObject:operation forKey:key];
30 | }
31 |
32 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key {
33 | // Cancel in progress downloader from queue
34 | NSMutableDictionary *operationDictionary = [self operationDictionary];
35 | id operations = [operationDictionary objectForKey:key];
36 | if (operations) {
37 | if ([operations isKindOfClass:[NSArray class]]) {
38 | for (id operation in operations) {
39 | if (operation) {
40 | [operation cancel];
41 | }
42 | }
43 | } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){
44 | [(id) operations cancel];
45 | }
46 | [operationDictionary removeObjectForKey:key];
47 | }
48 | }
49 |
50 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key {
51 | NSMutableDictionary *operationDictionary = [self operationDictionary];
52 | [operationDictionary removeObjectForKey:key];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/FlickrKit/FlickrKit-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_FlickrKit : NSObject
3 | @end
4 | @implementation PodsDummy_FlickrKit
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/FlickrKit/FlickrKit-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/FlickrKit/FlickrKit.modulemap:
--------------------------------------------------------------------------------
1 | framework module FlickrKit {
2 | umbrella header "FlickrKit-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/FlickrKit/FlickrKit.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FlickrKit
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_LDFLAGS = -framework "SystemConfiguration" -weak_framework "AssetsLibrary"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/FlickrKit/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.8
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Masonry-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Masonry-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "MASCompositeConstraint.h"
4 | #import "MASConstraint+Private.h"
5 | #import "MASConstraint.h"
6 | #import "MASConstraintMaker.h"
7 | #import "MASLayoutConstraint.h"
8 | #import "Masonry.h"
9 | #import "MASUtilities.h"
10 | #import "MASViewAttribute.h"
11 | #import "MASViewConstraint.h"
12 | #import "NSArray+MASAdditions.h"
13 | #import "NSArray+MASShorthandAdditions.h"
14 | #import "NSLayoutConstraint+MASDebugAdditions.h"
15 | #import "View+MASAdditions.h"
16 | #import "View+MASShorthandAdditions.h"
17 | #import "ViewController+MASAdditions.h"
18 |
19 | FOUNDATION_EXPORT double MasonryVersionNumber;
20 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
21 |
22 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Masonry.modulemap:
--------------------------------------------------------------------------------
1 | framework module Masonry {
2 | umbrella header "Masonry-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Masonry/Masonry.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Masonry
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Pods-MinyaDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_MinyaDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_MinyaDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Pods-MinyaDemo-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_MinyaDemoVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_MinyaDemoVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Pods-MinyaDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FlickrKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FlickrKit/FlickrKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage/SDWebImage.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "FlickrKit" -framework "Masonry" -framework "SDWebImage"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Pods-MinyaDemo.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_MinyaDemo {
2 | umbrella header "Pods-MinyaDemo-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/Pods-MinyaDemo/Pods-MinyaDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FlickrKit" "$PODS_CONFIGURATION_BUILD_DIR/Masonry" "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/FlickrKit/FlickrKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Masonry/Masonry.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage/SDWebImage.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "FlickrKit" -framework "Masonry" -framework "SDWebImage"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.8.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SDWebImage : NSObject
3 | @end
4 | @implementation PodsDummy_SDWebImage
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/SDWebImage-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "NSData+ImageContentType.h"
4 | #import "SDImageCache.h"
5 | #import "SDWebImageCompat.h"
6 | #import "SDWebImageDecoder.h"
7 | #import "SDWebImageDownloader.h"
8 | #import "SDWebImageDownloaderOperation.h"
9 | #import "SDWebImageManager.h"
10 | #import "SDWebImageOperation.h"
11 | #import "SDWebImagePrefetcher.h"
12 | #import "UIButton+WebCache.h"
13 | #import "UIImage+GIF.h"
14 | #import "UIImage+MultiFormat.h"
15 | #import "UIImageView+HighlightedWebCache.h"
16 | #import "UIImageView+WebCache.h"
17 | #import "UIView+WebCacheOperation.h"
18 |
19 | FOUNDATION_EXPORT double SDWebImageVersionNumber;
20 | FOUNDATION_EXPORT const unsigned char SDWebImageVersionString[];
21 |
22 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/SDWebImage.modulemap:
--------------------------------------------------------------------------------
1 | framework module SDWebImage {
2 | umbrella header "SDWebImage-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDWebImage
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_LDFLAGS = -framework "ImageIO"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Minya
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Minya/Core/NSObject+MIDealloc.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MIDealloc.h
3 | // MinyaDemo
4 | //
5 | // Created by 00 on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Category for NSObject's dealloc method swizzling.
15 | */
16 | @interface NSObject (MIDealloc)
17 |
18 | /**
19 | * Register a new dealloc handle block for the handleKey.
20 | *
21 | * We will use a block as the new implementation for the dealloc method, and store this block
22 | * in a directory for the later swizzling.
23 | *
24 | * @param handleKey Key for the new block
25 | * @param willDeallocHandle New implementation for the dealloc method
26 | */
27 | - (void)registerDeallocHandleWithKey:(NSString * _Nonnull)handleKey handle:(void (^)())willDeallocHandle;
28 |
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
--------------------------------------------------------------------------------
/Minya/Core/NSObject+MINotification.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MINotification.h
3 | // MinyaDemo
4 | //
5 | // Created by 00 on 2016/11/2.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | Callback for handling notification
15 |
16 | @param notification notification informations
17 | */
18 | typedef void (^MINotificationBlock)(NSNotification * _Nonnull notification);
19 |
20 | #pragma mark - NSObject MINotification Category
21 | /**
22 | Category for NSObject's Notification
23 | */
24 | @interface NSObject (MINotification)
25 |
26 | /**
27 | Add current object as an observer for the special notification
28 |
29 | This method is an alternative method for NSNotificationCenter's `-addObserver:selector:name:object:` method.
30 | the sender parameter is the same as `object` parameter.
31 |
32 | @param notificationName notification name
33 | @param sender notification sender
34 | @param handler handler callback
35 | */
36 | - (void)observeNotification:(NSString * _Nonnull)notificationName sender:(id _Nullable)sender handler:(MINotificationBlock _Nonnull)handler;
37 |
38 | /**
39 | Remove notification which belong to current object for the special name.
40 |
41 | @param notificationName notification name
42 | */
43 | - (void)removeNotification:(NSString * _Nonnull)notificationName;
44 |
45 | @end
46 |
47 | NS_ASSUME_NONNULL_END
48 |
--------------------------------------------------------------------------------
/Minya/Core/NSObject+MISwizzle.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MISwizzle.h
3 | // MinyaDemo
4 | //
5 | // Created by 00 on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * Category for NSObject's method swizzling
15 | */
16 | @interface NSObject (MISwizzle)
17 |
18 | /**
19 | * swizzling method implementations of original selector and target selector
20 | *
21 | * @param originalSelector original selector
22 | * @param targetSelector target selector
23 | */
24 | + (void)swizzleOriginalSelector:(SEL _Nonnull)originalSelector targetSelector:(SEL _Nonnull)targetSelector;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/Minya/Core/NSObject+MISwizzle.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MISwizzle.m
3 | // MinyaDemo
4 | //
5 | // Created by 00 on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "NSObject+MISwizzle.h"
10 | #import
11 |
12 | @implementation NSObject (MISwizzle)
13 |
14 | + (void)swizzleOriginalSelector:(SEL)originalSelector targetSelector:(SEL)targetSelector {
15 |
16 | NSParameterAssert(originalSelector);
17 | NSParameterAssert(targetSelector);
18 |
19 | Method originalMethod = class_getInstanceMethod([self class], originalSelector);
20 | Method targetMethod = class_getInstanceMethod([self class], targetSelector);
21 |
22 | if (!originalMethod || !targetMethod) {
23 | return;
24 | }
25 |
26 | // Try to add a new method to the class.
27 | // The method's selector is the originalSelector,
28 | // and the implementation is targetMethod
29 | BOOL success = class_addMethod([self class],
30 | originalSelector,
31 | method_getImplementation(targetMethod),
32 | method_getTypeEncoding(targetMethod));
33 |
34 | // If adding method is success, we replace the target method's implementation
35 | // with the original method implementation;
36 | // else we will exchange the implementations directly.
37 | if (success) {
38 | class_replaceMethod([self class],
39 | targetSelector,
40 | method_getImplementation(originalMethod),
41 | method_getTypeEncoding(originalMethod));
42 | } else {
43 | method_exchangeImplementations(originalMethod, targetMethod);
44 | }
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/LICENSE.md:
--------------------------------------------------------------------------------
1 | **Copyright (c) 2012 - 2014 Justin Spahr-Summers**
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTADT.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTADT.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 25.06.12.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTADT.h"
11 | #import
12 | #import
13 |
14 | const char *ext_trimADTJunkFromTypeEncoding (const char *encoding) {
15 | // we need to skip past two unions in the type string
16 | const char *next;
17 |
18 | for (int i = 0; i < 2; ++i) {
19 | next = strstr(encoding, "(?=");
20 | if (!next)
21 | break;
22 |
23 | encoding = next + 3;
24 | }
25 |
26 | return encoding;
27 | }
28 |
29 | NSString *ext_parameterNameFromDeclaration (NSString *declaration) {
30 | NSMutableCharacterSet *identifierCharacterSet = [[NSCharacterSet alphanumericCharacterSet] mutableCopy];
31 | [identifierCharacterSet addCharactersInString:@"$_"];
32 |
33 | // now invert, to get all characters disallowed in identifiers
34 | [identifierCharacterSet invert];
35 |
36 | NSRange lastWhitespace = [declaration rangeOfCharacterFromSet:identifierCharacterSet options:NSBackwardsSearch];
37 | return [declaration substringFromIndex:lastWhitespace.location + 1];
38 | }
39 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTNil.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXTNil.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-04-25.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import
11 |
12 | /**
13 | * Like \c NSNull, this class provides a singleton object that can be used to
14 | * represent a \c NULL or \c nil value. Unlike \c NSNull, this object behaves
15 | * more similarly to a \c nil object, responding to messages with "zero" values.
16 | * This eliminates the need for \c NSNull class or equality checks with
17 | * collections that need to contain null values.
18 | *
19 | * This class will pretend to be \c NSNull when queried for its class or
20 | * compared for equality, to keep compatibility with code that expects or uses
21 | * \c NSNull.
22 | *
23 | * @note Because this class does still behave like an object in some ways, it
24 | * will respond to certain \c NSObject protocol methods where an actually \c nil
25 | * object would not.
26 | */
27 | @interface EXTNil : NSProxy {
28 |
29 | }
30 |
31 | /**
32 | * Returns the singleton \c EXTNil instance. This naming matches that of \c
33 | * NSNull -- \c nil as a method name is unusable because it is a language
34 | * keyword.
35 | */
36 | + (id)null;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTNil.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTNil.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-04-25.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTNil.h"
11 | #import "EXTRuntimeExtensions.h"
12 |
13 | static id singleton = nil;
14 |
15 | @implementation EXTNil
16 | + (void)initialize {
17 | if (self == [EXTNil class]) {
18 | if (!singleton)
19 | singleton = [self alloc];
20 | }
21 | }
22 |
23 | + (EXTNil *)null {
24 | return singleton;
25 | }
26 |
27 | - (id)init {
28 | return self;
29 | }
30 |
31 | #pragma mark NSCopying
32 |
33 | - (id)copyWithZone:(NSZone *)zone {
34 | return self;
35 | }
36 |
37 | #pragma mark Forwarding machinery
38 |
39 | - (void)forwardInvocation:(NSInvocation *)anInvocation {
40 | NSUInteger returnLength = [[anInvocation methodSignature] methodReturnLength];
41 | if (!returnLength) {
42 | // nothing to do
43 | return;
44 | }
45 |
46 | // set return value to all zero bits
47 | char buffer[returnLength];
48 | memset(buffer, 0, returnLength);
49 |
50 | [anInvocation setReturnValue:buffer];
51 | }
52 |
53 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
54 | return ext_globalMethodSignatureForSelector(selector);
55 | }
56 |
57 | - (BOOL)respondsToSelector:(SEL)selector {
58 | // behave like nil
59 | return NO;
60 | }
61 |
62 | #pragma mark NSObject protocol
63 |
64 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol {
65 | return NO;
66 | }
67 |
68 | - (NSUInteger)hash {
69 | return 0;
70 | }
71 |
72 | - (BOOL)isEqual:(id)obj {
73 | return !obj || obj == self || [obj isEqual:[NSNull null]];
74 | }
75 |
76 | - (BOOL)isKindOfClass:(Class)class {
77 | return [class isEqual:[EXTNil class]] || [class isEqual:[NSNull class]];
78 | }
79 |
80 | - (BOOL)isMemberOfClass:(Class)class {
81 | return [class isEqual:[EXTNil class]] || [class isEqual:[NSNull class]];
82 | }
83 |
84 | - (BOOL)isProxy {
85 | // not really a proxy -- we just inherit from NSProxy because it makes
86 | // method signature lookup simpler
87 | return NO;
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTSafeCategory.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTSafeCategory.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2010-11-13.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTSafeCategory.h"
11 | #import "EXTRuntimeExtensions.h"
12 | #import
13 |
14 | static
15 | void safeCategoryMethodFailed (Class cls, Method method) {
16 | const char *methodName = sel_getName(method_getName(method));
17 | const char *className = class_getName(cls);
18 |
19 | BOOL isMeta = class_isMetaClass(cls);
20 | if (isMeta)
21 | fprintf(stderr, "ERROR: Could not add class method +%s to %s (a method by the same name already exists)\n", methodName, className);
22 | else
23 | fprintf(stderr, "ERROR: Could not add instance method -%s to %s (a method by the same name already exists)\n", methodName, className);
24 | }
25 |
26 | /**
27 | * This loads a safe category into the destination class, making sure not to
28 | * overwrite any methods that already exist. \a methodContainer is the class
29 | * containing the methods defined in the safe category. \a targetClass is the
30 | * destination of the methods.
31 | *
32 | * Returns \c YES if all methods loaded without conflicts, or \c NO if
33 | * loading failed, whether due to a naming conflict or some other error.
34 | */
35 | BOOL ext_loadSafeCategory (Class methodContainer, Class targetClass) {
36 | if (!methodContainer || !targetClass)
37 | return NO;
38 |
39 | return ext_injectMethodsFromClass(
40 | methodContainer,
41 | targetClass,
42 | ext_methodInjectionFailOnAnyExisting | ext_methodInjectionIgnoreLoad,
43 | &safeCategoryMethodFailed
44 | );
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTScope.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTScope.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-05-04.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTScope.h"
11 |
12 | void ext_executeCleanupBlock (__strong ext_cleanupBlock_t *block) {
13 | (*block)();
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTSelectorChecking.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXTSelectorChecking.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 26.06.12.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import
11 | #import "metamacros.h"
12 |
13 | /**
14 | * \@checkselector verifies at compile-time that a selector can be invoked
15 | * against the given TARGET. The checked selector is then returned as a SEL.
16 | *
17 | * The variadic arguments should be pieces of the selector, each ending with
18 | * ':'. For example:
19 | *
20 | * @code
21 |
22 | [myButton addTarget:self action:@checkselector(self, buttonAction:) forControlEvents:UIControlEventTouchUpInside];
23 | [otherButton addTarget:self action:@checkselector(self, buttonAction:, withEvent:) forControlEvents:UIControlEventTouchUpInside];
24 |
25 | * @endcode
26 | *
27 | * For zero-argument selectors, use \@checkselector0 instead.
28 | *
29 | * @bug This macro currently does not work with selectors with variadic
30 | * arguments.
31 | *
32 | * @bug This macro will not work if the method on TARGET designated by the
33 | * selector must accept a struct or union argument.
34 | */
35 | #define checkselector(TARGET, ...) \
36 | (((void)(NO && ((void)[TARGET metamacro_foreach(ext_checkselector_message_iter,, __VA_ARGS__)], NO)), \
37 | metamacro_foreach(ext_checkselector_selector_iter,, __VA_ARGS__))).ext_toSelector
38 |
39 | #define checkselector0(TARGET, SELECTOR) \
40 | (((void)(NO && ((void)[TARGET SELECTOR], NO)), \
41 | # SELECTOR)).ext_toSelector
42 |
43 | /*** implementation details follow ***/
44 | #define ext_checkselector_message_iter(INDEX, SELPART) \
45 | SELPART (0)
46 |
47 | #define ext_checkselector_selector_iter(INDEX, SELPART) \
48 | # SELPART
49 |
50 | @interface NSString (EXTCheckedSelectorAdditions)
51 | - (SEL)ext_toSelector;
52 | @end
53 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/EXTSelectorChecking.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTSelectorChecking.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 26.06.12.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTSelectorChecking.h"
11 |
12 | @implementation NSString (EXTCheckedSelectorAdditions)
13 | - (SEL)ext_toSelector {
14 | return NSSelectorFromString(self);
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/NSInvocation+EXT.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSInvocation+EXT.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-03-11.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import
11 |
12 | @interface NSInvocation (EXTExtensions)
13 | /**
14 | * Using the variadic arguments in \a args, initializes the arguments of this
15 | * invocation starting at index 2 (after 'self' and '_cmd'). The argument types
16 | * are determined using the invocation's method signature.
17 | *
18 | * Returns \c NO if an error occurs (such as being unable to retrieve an
19 | * argument for a certain type).
20 | *
21 | * @warning Due to the mechanics behind variable argument lists, this method cannot
22 | * be used with method signatures that involve \c struct or \c union parameters.
23 | * Blocks and function pointers may or may not also cause problems. Such
24 | * arguments must be set individually.
25 | */
26 | - (BOOL)setArgumentsFromArgumentList:(va_list)args;
27 | @end
28 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/NSMethodSignature+EXT.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMethodSignature+EXT.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-03-11.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import
11 |
12 | @interface NSMethodSignature (EXTExtensions)
13 | /**
14 | * Creates and returns a new method signature based off the receiver, but with
15 | * an additional argument of the given type at \a index. If \a index is greater
16 | * than the current number of arguments, the behavior is undefined.
17 | */
18 | - (NSMethodSignature *)methodSignatureByInsertingType:(const char *)type atArgumentIndex:(NSUInteger)index;
19 |
20 | /**
21 | * Returns the Objective-C type encoding for this method signature, which
22 | * includes the return type and all arguments. The resultant string matches the
23 | * format of \c method_getTypeEncoding() and is suitable for passing to \c
24 | * class_addMethod() and similar facilities.
25 | *
26 | * @note The returned string is autoreleased.
27 | */
28 | - (const char *)typeEncoding;
29 | @end
30 |
--------------------------------------------------------------------------------
/Minya/Lib/libextobjc/extobjc/extobjc.h:
--------------------------------------------------------------------------------
1 | //
2 | // extobjc.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2010-11-09.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTADT.h"
11 | #import "EXTConcreteProtocol.h"
12 | #import "EXTKeyPathCoding.h"
13 | #import "EXTNil.h"
14 | #import "EXTSafeCategory.h"
15 | #import "EXTScope.h"
16 | #import "EXTSelectorChecking.h"
17 | #import "EXTSynthesize.h"
18 | #import "NSInvocation+EXT.h"
19 | #import "NSMethodSignature+EXT.h"
20 |
21 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIPipeline.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIPipeline.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIPipeline.h"
10 |
11 | /**
12 | * Basic class for pipeline
13 | */
14 | @implementation MIPipeline
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIScene.h
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | * JDScene class
15 | *
16 | * A scene is actually a view controller.
17 | * In Minya MVCS architecture, a scene include three parts:
18 | * 1. view controller
19 | * 2. container view
20 | * 3. store
21 | *
22 | * So, when we create a scene, we should provide the three parts informations.
23 | * Here, we just need to provide the name of each part. We can use these
24 | * name to create a complete scene
25 | *
26 | */
27 | @interface MIScene : NSObject
28 |
29 | @property (nonatomic, copy, nonnull) NSString *viewName; //!< view name
30 | @property (nonatomic, copy, nonnull) NSString *controllerName; //!< controller name
31 | @property (nonatomic, copy, nonnull) NSString *storeName; //!< store name
32 |
33 | + (instancetype _Nullable)sceneWithView:(NSString * _Nonnull)viewName controller:(NSString * _Nonnull)controllerName store:(NSString * _Nonnull)storeName;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIScene.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIScene.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIScene.h"
10 |
11 | @implementation MIScene
12 |
13 | #pragma mark - Class Method
14 | + (instancetype)sceneWithView:(NSString *)viewName controller:(NSString *)controllerName store:(NSString *)storeName {
15 |
16 | NSParameterAssert(viewName);
17 | NSParameterAssert(controllerName);
18 | NSParameterAssert(storeName);
19 |
20 | MIScene *scene = [[MIScene alloc] init];
21 | scene.viewName = viewName;
22 | scene.controllerName = controllerName;
23 | scene.storeName = storeName;
24 |
25 | return scene;
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIService.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIService.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIService.h"
10 |
11 | @implementation MIService
12 |
13 | #pragma mark - Class Method
14 | + (id)serviceWithName:(NSString *)serviceName {
15 |
16 | NSParameterAssert(serviceName);
17 |
18 | Class serviceClass = NSClassFromString(serviceName);
19 |
20 | if (serviceClass == NULL) {
21 | return nil;
22 | }
23 |
24 | NSAssert([serviceClass conformsToProtocol:@protocol(MIService)] && [serviceClass isSubclassOfClass:[MIService class]],
25 | @"%@ class should conform to MIService protocol and be the subclass of MIService class", serviceName);
26 |
27 | return [[serviceClass alloc] init];
28 | }
29 |
30 | #pragma mark - MIService Protocol
31 | - (void)requestWithParameters:(NSDictionary *)parameters
32 | success:(MIRequestSuccessBlock)success
33 | fail:(MIRequestFailBlock)fail {
34 |
35 | @throw [NSException exceptionWithName:@"MinyaServiceException"
36 | reason:[NSString stringWithFormat:@"【%s】 You must implement `-requestWithParameters:success:fail:` method in the subclass of MIService.", __PRETTY_FUNCTION__]
37 | userInfo:nil];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIStorage.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIStorage.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIStorage.h"
10 |
11 | @implementation MIStorage
12 |
13 | + (id)storageWithName:(NSString *)storageName {
14 |
15 | NSParameterAssert(storageName);
16 |
17 | Class storageClass = NSClassFromString(storageName);
18 |
19 | if (!storageClass) {
20 | return nil;
21 | }
22 |
23 | NSAssert([storageClass conformsToProtocol:@protocol(MIStorage)] && [storageClass isSubclassOfClass:[MIStorage class]],
24 | @"%@ class should conform to MIStorage protocol and be the subclass of MIStorage class", storageName);
25 |
26 | return [[storageClass alloc] init];
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIStore.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIStore.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIStore.h"
10 | #import "MIPipeline.h"
11 |
12 | #pragma mark - MIStore implementation
13 |
14 | @implementation MIStore
15 |
16 | - (instancetype)initWithContext:(NSDictionary *)context {
17 |
18 | self = [super init];
19 |
20 | if (self) {
21 |
22 | NSAssert([self.class mi_checkContext:context],
23 | @"The context for the %@ should container all the keys in [%@]", NSStringFromClass([self class]), [[self.class requiredParameters] componentsJoinedByString:@","]);
24 |
25 | _context = context;
26 |
27 | // [self addObservers];
28 | }
29 |
30 | return self;
31 | }
32 |
33 | - (void)addObservers {
34 |
35 | }
36 |
37 | #pragma mark - Check Method
38 |
39 | + (NSArray *)requiredParameters {
40 | return nil;
41 | }
42 |
43 | #pragma mark - MIStore Protocol
44 |
45 | - (MIPipeline *)pipeline {
46 | @throw [NSException exceptionWithName:@"MinyaStroeException"
47 | reason:[NSString stringWithFormat:@"【%s】You must implement `-pipeline` method in the subclass of MIStore", __PRETTY_FUNCTION__]
48 | userInfo:nil];
49 | }
50 |
51 | - (void)fetchData { }
52 |
53 | #pragma mark - Private Methods
54 |
55 | // Check that if all the required parameter keys in the context.
56 | // if not, return NO; else return YES
57 | + (BOOL)mi_checkContext:(NSDictionary *)context {
58 |
59 | NSArray *keys = context.allKeys;
60 |
61 | for (NSString *parameter in [self requiredParameters]) {
62 | if (![keys containsObject:parameter]) {
63 | return NO;
64 | }
65 | }
66 |
67 | return YES;
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/Minya/MVCS/MIViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIViewController.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIViewController.h"
10 | #import "MIStore.h"
11 | #import "UIView+MIPipeline.h"
12 |
13 | #pragma mark - MIViewController Extension
14 |
15 | @interface MIViewController ()
16 |
17 | @property (nonatomic, assign) Class viewClass; //!< Container view class
18 | @property (nonatomic, copy) MICallback callback; //!< Callback for the previous ViewController
19 |
20 | @end
21 |
22 | #pragma mark - MIViewController implementation
23 |
24 | @implementation MIViewController
25 |
26 | #pragma mark - Life Cycle
27 |
28 | - (instancetype)initWithStore:(id)store viewClass:(Class)viewClass {
29 |
30 | return [self initWithStore:store viewClass:viewClass callback:nil];
31 | }
32 |
33 | - (instancetype)initWithStore:(id)store viewClass:(Class)viewClass callback:(MICallback)callback {
34 |
35 | NSParameterAssert(store);
36 | NSAssert([viewClass isSubclassOfClass:[UIView class]], @"viewClass should be subclass of UIView");
37 |
38 | self = [super init];
39 |
40 | if (self) {
41 |
42 | _store = store;
43 | _viewClass = viewClass;
44 | _callback = [callback copy];
45 | }
46 |
47 | return self;
48 | }
49 |
50 | - (void)loadView {
51 | [super loadView];
52 |
53 | self.view = [[self.viewClass alloc] init];
54 | }
55 |
56 | - (void)viewDidLoad {
57 | [super viewDidLoad];
58 |
59 | // Set up pipeline
60 | [self setupPipeline:self.store.pipeline];
61 | [self.view setupPipeline:self.store.pipeline];
62 |
63 | // Add observers of the pipeline data.
64 | [self addObservers];
65 | }
66 |
67 | #pragma mark - Public Methods
68 |
69 | - (void)addObservers { }
70 |
71 | - (void)setupPipeline:(__kindof MIPipeline *)pipeline { }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/Minya/MVCS/UIView+MIPipeline.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MIPipeline.h
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIPipeline.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | * UIView+MIPipeline Category
16 | *
17 | * UIView category for pipeline
18 | */
19 | @interface UIView (MIPipeline)
20 |
21 | /**
22 | * Set up the view's pipeline
23 | *
24 | * @param pipeline pipeline for current view
25 | */
26 | - (void)setupPipeline:(__kindof MIPipeline * _Nonnull)pipeline;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/Minya/MVCS/UIView+MIPipeline.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MIPipeline.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "UIView+MIPipeline.h"
10 |
11 | @implementation UIView (MIPipeline)
12 |
13 | - (void)setupPipeline:(__kindof MIPipeline *)pipeline { }
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Minya/Minya.h:
--------------------------------------------------------------------------------
1 | //
2 | // Minya.h
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/10/13.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #ifndef Minya_h
10 | #define Minya_h
11 |
12 | #define MINYA_VERSION 1.0.1
13 |
14 | #import "MIStore.h"
15 | #import "MIStorage.h"
16 | #import "MIService.h"
17 | #import "MIPipeline.h"
18 | #import "MIViewController.h"
19 | #import "UIView+MIPipeline.h"
20 |
21 | #import "MIScene.h"
22 | #import "MIMediator.h"
23 |
24 | #import "NSObject+MIDealloc.h"
25 | #import "NSObject+MIKVO.h"
26 | #import "NSObject+MINotification.h"
27 |
28 | #import "EXTScope.h"
29 |
30 | #endif /* Minya_h */
31 |
--------------------------------------------------------------------------------
/Minya/Module/MIMediator.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMediator.h
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | #import "MIUtilities.h"
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @class MIScene;
17 |
18 | /**
19 | * MIMediator class
20 | *
21 | * MIMediator is the mediator between modules or scenes.
22 | * When we want to start a module, or create a scene view controller,
23 | * we should use this singleton instance.
24 | */
25 | @interface MIMediator : NSObject
26 |
27 | #pragma mark - Life Cycle
28 |
29 | + (instancetype _Nonnull)sharedMediator;
30 |
31 | #pragma mark - Scene
32 |
33 | /**
34 | * Get a view controller
35 | *
36 | * @param scene scene infomation
37 | * @param context context for this scene
38 | * @param callback callback block. Now it is unused, it is just prepared for the next version.
39 | *
40 | * @return view controller
41 | */
42 | - (UIViewController * _Nullable)viewControllerWithScene:(MIScene * _Nonnull)scene
43 | context:(NSDictionary * _Nullable)context
44 | callback:(MICallback _Nullable)callback;
45 |
46 | - (UIViewController * _Nullable)viewControllerWithScene:(MIScene * _Nonnull)scene
47 | context:(NSDictionary * _Nullable)context;
48 |
49 | @end
50 |
51 | NS_ASSUME_NONNULL_END
52 |
--------------------------------------------------------------------------------
/Minya/Module/MIMediator.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIMediator.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/9/28.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIMediator.h"
10 | #import "MIScene.h"
11 | #import "MIViewController.h"
12 | #import "MIStore.h"
13 |
14 | @implementation MIMediator
15 |
16 | #pragma mark - Life Cycle
17 |
18 | + (instancetype)sharedMediator {
19 |
20 | static MIMediator *mediator = nil;
21 | static dispatch_once_t onceToken;
22 | dispatch_once(&onceToken, ^{
23 | mediator = [[MIMediator alloc] init];
24 | });
25 |
26 | return mediator;
27 | }
28 |
29 | #pragma mark - Scene
30 |
31 | - (UIViewController *)viewControllerWithScene:(MIScene *)scene context:(NSDictionary *)context {
32 |
33 | return [self viewControllerWithScene:scene context:context callback:nil];
34 | }
35 |
36 | - (UIViewController *)viewControllerWithScene:(MIScene *)scene context:(NSDictionary *)context callback:(MICallback)callback {
37 |
38 | NSParameterAssert(scene);
39 |
40 | // Check if the controller class is subclass of MIViewController
41 | Class controllerClass = NSClassFromString(scene.controllerName);
42 | NSAssert([controllerClass isSubclassOfClass:[MIViewController class]],
43 | @"%@ is not subclass of MIViewController", scene.controllerName);
44 |
45 | // Check if the store and view is valid
46 | Class storeClass = NSClassFromString(scene.storeName);
47 | NSAssert([storeClass conformsToProtocol:@protocol(MIStore)],
48 | @"%@ is not conform to MIStore Protocol", scene.storeName);
49 |
50 | Class viewClass = NSClassFromString(scene.viewName);
51 | NSAssert([viewClass isSubclassOfClass:[UIView class]],
52 | @"%@ is not a subclass of UIView", scene.viewName);
53 |
54 | id store = [[storeClass alloc] initWithContext:context];
55 |
56 | return [[controllerClass alloc] initWithStore:store viewClass:viewClass callback:callback];
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/Minya/Module/MIUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIUtilities.h
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/10/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^MICallback)(NSDictionary * _Nullable);
12 |
--------------------------------------------------------------------------------
/Minya/Module/MIUtilities.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIUtilities.m
3 | // MinyaDemo
4 | //
5 | // Created by Konka on 2016/10/27.
6 | // Copyright © 2016年 Minya. All rights reserved.
7 | //
8 |
9 | #import "MIUtilities.h"
10 |
--------------------------------------------------------------------------------