├── .gitignore
├── .idea
└── IMY_Theme.iml
├── IMY_Theme.podspec.json
├── IMY_Theme.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── IMY_Theme.xcworkspace
└── contents.xcworkspacedata
├── IMY_Theme
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ └── LaunchScreen.xib
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Test.h
├── Test.m
├── ThemeSupport
│ ├── IMYInvocation.h
│ ├── IMYInvocation.m
│ ├── IMYSetImageProtocol.h
│ ├── IMYThemeColorMacros.h
│ ├── IMYThemeConfig.h
│ ├── IMYThemeImageCache.h
│ ├── IMYThemeImageCache.m
│ ├── IMYThemeManager.h
│ ├── IMYThemeManager.m
│ ├── IMY_SDWebImage
│ │ ├── NSString+IMY_WebImage.h
│ │ ├── NSString+IMY_WebImage.m
│ │ ├── UIImageView+IMY_WebImage.h
│ │ └── UIImageView+IMY_WebImage.m
│ ├── NSObject+IMY_Theme.h
│ ├── NSObject+IMY_Theme.m
│ ├── NSString+IMY_Theme.h
│ ├── NSString+IMY_Theme.m
│ ├── UIButton+IMY_Theme.h
│ ├── UIButton+IMY_Theme.m
│ ├── UIColor+IMY_Theme.h
│ ├── UIColor+IMY_Theme.m
│ ├── UIImage+IMY_Theme.h
│ ├── UIImage+IMY_Theme.m
│ ├── UIImageView+IMY_Theme.h
│ ├── UIImageView+IMY_Theme.m
│ ├── UINavigationBar+IMY_Theme.h
│ ├── UINavigationBar+IMY_Theme.m
│ ├── UITabBarItem+IMY_Theme.h
│ └── UITabBarItem+IMY_Theme.m
├── ViewController.h
├── ViewController.m
├── all_bottommeetyou.png
├── all_bottommeetyou@2x.png
├── all_bottommeetyou@3x.png
├── all_bottommeetyou_up.png
├── all_bottommeetyou_up@2x.png
├── all_bottommeetyou_up@3x.png
├── all_bottomnews.png
├── all_bottomnews@2x.png
├── all_bottomnews@3x.png
├── all_bottomnews_up.png
├── all_bottomnews_up@2x.png
├── all_bottomnews_up@3x.png
├── chat_pinkbg.png
├── chat_pinkbg@2x.png
├── chat_pinkbg@3x.png
├── config.json
├── main.m
├── nav.png
└── theme2.bundle
│ ├── all_bottommeetyou.png
│ ├── all_bottommeetyou@2x.png
│ ├── all_bottommeetyou@3x.png
│ ├── all_bottommeetyou_up.png
│ ├── all_bottommeetyou_up@2x.png
│ ├── all_bottommeetyou_up@3x.png
│ ├── all_bottomnews.png
│ ├── all_bottomnews@2x.png
│ ├── all_bottomnews@3x.png
│ ├── all_bottomnews_up.png
│ ├── all_bottomnews_up@2x.png
│ ├── all_bottomnews_up@3x.png
│ ├── chat_pinkbg.png
│ ├── chat_pinkbg@2x.png
│ ├── config.json
│ └── nav.png
├── IMY_ThemeTests
├── IMY_ThemeTests.m
└── Info.plist
├── LICENSE
├── Podfile
├── Podfile.lock
├── Pods
├── Aspects
│ ├── Aspects.h
│ ├── Aspects.m
│ ├── LICENSE
│ └── README.md
├── BlocksKit
│ ├── BlocksKit
│ │ ├── BlocksKit+MessageUI.h
│ │ ├── BlocksKit+UIKit.h
│ │ ├── BlocksKit.h
│ │ ├── Core
│ │ │ ├── BKMacros.h
│ │ │ ├── NSArray+BlocksKit.h
│ │ │ ├── NSArray+BlocksKit.m
│ │ │ ├── NSDictionary+BlocksKit.h
│ │ │ ├── NSDictionary+BlocksKit.m
│ │ │ ├── NSIndexSet+BlocksKit.h
│ │ │ ├── NSIndexSet+BlocksKit.m
│ │ │ ├── NSInvocation+BlocksKit.h
│ │ │ ├── NSInvocation+BlocksKit.m
│ │ │ ├── NSMutableArray+BlocksKit.h
│ │ │ ├── NSMutableArray+BlocksKit.m
│ │ │ ├── NSMutableDictionary+BlocksKit.h
│ │ │ ├── NSMutableDictionary+BlocksKit.m
│ │ │ ├── NSMutableIndexSet+BlocksKit.h
│ │ │ ├── NSMutableIndexSet+BlocksKit.m
│ │ │ ├── NSMutableOrderedSet+BlocksKit.h
│ │ │ ├── NSMutableOrderedSet+BlocksKit.m
│ │ │ ├── NSMutableSet+BlocksKit.h
│ │ │ ├── NSMutableSet+BlocksKit.m
│ │ │ ├── NSObject+BKAssociatedObjects.h
│ │ │ ├── NSObject+BKAssociatedObjects.m
│ │ │ ├── NSObject+BKBlockExecution.h
│ │ │ ├── NSObject+BKBlockExecution.m
│ │ │ ├── NSObject+BKBlockObservation.h
│ │ │ ├── NSObject+BKBlockObservation.m
│ │ │ ├── NSOrderedSet+BlocksKit.h
│ │ │ ├── NSOrderedSet+BlocksKit.m
│ │ │ ├── NSSet+BlocksKit.h
│ │ │ ├── NSSet+BlocksKit.m
│ │ │ ├── NSTimer+BlocksKit.h
│ │ │ └── NSTimer+BlocksKit.m
│ │ ├── DynamicDelegate
│ │ │ ├── A2BlockInvocation.h
│ │ │ ├── A2BlockInvocation.m
│ │ │ ├── A2DynamicDelegate.h
│ │ │ ├── A2DynamicDelegate.m
│ │ │ ├── Foundation
│ │ │ │ ├── NSCache+BlocksKit.h
│ │ │ │ ├── NSCache+BlocksKit.m
│ │ │ │ ├── NSURLConnection+BlocksKit.h
│ │ │ │ └── NSURLConnection+BlocksKit.m
│ │ │ ├── NSObject+A2BlockDelegate.h
│ │ │ ├── NSObject+A2BlockDelegate.m
│ │ │ ├── NSObject+A2DynamicDelegate.h
│ │ │ └── NSObject+A2DynamicDelegate.m
│ │ ├── MessageUI
│ │ │ ├── MFMailComposeViewController+BlocksKit.h
│ │ │ ├── MFMailComposeViewController+BlocksKit.m
│ │ │ ├── MFMessageComposeViewController+BlocksKit.h
│ │ │ └── MFMessageComposeViewController+BlocksKit.m
│ │ └── UIKit
│ │ │ ├── UIActionSheet+BlocksKit.h
│ │ │ ├── UIActionSheet+BlocksKit.m
│ │ │ ├── UIAlertView+BlocksKit.h
│ │ │ ├── UIAlertView+BlocksKit.m
│ │ │ ├── UIBarButtonItem+BlocksKit.h
│ │ │ ├── UIBarButtonItem+BlocksKit.m
│ │ │ ├── UIControl+BlocksKit.h
│ │ │ ├── UIControl+BlocksKit.m
│ │ │ ├── UIGestureRecognizer+BlocksKit.h
│ │ │ ├── UIGestureRecognizer+BlocksKit.m
│ │ │ ├── UIImagePickerController+BlocksKit.h
│ │ │ ├── UIImagePickerController+BlocksKit.m
│ │ │ ├── UIPopoverController+BlocksKit.h
│ │ │ ├── UIPopoverController+BlocksKit.m
│ │ │ ├── UITextField+BlocksKit.h
│ │ │ ├── UITextField+BlocksKit.m
│ │ │ ├── UIView+BlocksKit.h
│ │ │ ├── UIView+BlocksKit.m
│ │ │ ├── UIWebView+BlocksKit.h
│ │ │ └── UIWebView+BlocksKit.m
│ ├── LICENSE
│ └── README.md
├── Headers
│ ├── Private
│ │ ├── Aspects
│ │ │ └── Aspects.h
│ │ ├── BlocksKit
│ │ │ ├── A2BlockInvocation.h
│ │ │ ├── A2DynamicDelegate.h
│ │ │ ├── BKMacros.h
│ │ │ ├── BlocksKit+MessageUI.h
│ │ │ ├── BlocksKit+UIKit.h
│ │ │ ├── BlocksKit.h
│ │ │ ├── MFMailComposeViewController+BlocksKit.h
│ │ │ ├── MFMessageComposeViewController+BlocksKit.h
│ │ │ ├── NSArray+BlocksKit.h
│ │ │ ├── NSCache+BlocksKit.h
│ │ │ ├── NSDictionary+BlocksKit.h
│ │ │ ├── NSIndexSet+BlocksKit.h
│ │ │ ├── NSInvocation+BlocksKit.h
│ │ │ ├── NSMutableArray+BlocksKit.h
│ │ │ ├── NSMutableDictionary+BlocksKit.h
│ │ │ ├── NSMutableIndexSet+BlocksKit.h
│ │ │ ├── NSMutableOrderedSet+BlocksKit.h
│ │ │ ├── NSMutableSet+BlocksKit.h
│ │ │ ├── NSObject+A2BlockDelegate.h
│ │ │ ├── NSObject+A2DynamicDelegate.h
│ │ │ ├── NSObject+BKAssociatedObjects.h
│ │ │ ├── NSObject+BKBlockExecution.h
│ │ │ ├── NSObject+BKBlockObservation.h
│ │ │ ├── NSOrderedSet+BlocksKit.h
│ │ │ ├── NSSet+BlocksKit.h
│ │ │ ├── NSTimer+BlocksKit.h
│ │ │ ├── NSURLConnection+BlocksKit.h
│ │ │ ├── UIActionSheet+BlocksKit.h
│ │ │ ├── UIAlertView+BlocksKit.h
│ │ │ ├── UIBarButtonItem+BlocksKit.h
│ │ │ ├── UIControl+BlocksKit.h
│ │ │ ├── UIGestureRecognizer+BlocksKit.h
│ │ │ ├── UIImagePickerController+BlocksKit.h
│ │ │ ├── UIPopoverController+BlocksKit.h
│ │ │ ├── UITextField+BlocksKit.h
│ │ │ ├── UIView+BlocksKit.h
│ │ │ └── UIWebView+BlocksKit.h
│ │ ├── Masonry
│ │ │ ├── MASCompositeConstraint.h
│ │ │ ├── MASConstraint+Private.h
│ │ │ ├── MASConstraint.h
│ │ │ ├── MASConstraintMaker.h
│ │ │ ├── MASLayoutConstraint.h
│ │ │ ├── MASUtilities.h
│ │ │ ├── MASViewAttribute.h
│ │ │ ├── MASViewConstraint.h
│ │ │ ├── Masonry.h
│ │ │ ├── NSArray+MASAdditions.h
│ │ │ ├── NSArray+MASShorthandAdditions.h
│ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ │ ├── View+MASAdditions.h
│ │ │ └── View+MASShorthandAdditions.h
│ │ └── ObjcAssociatedObjectHelpers
│ │ │ ├── NSObject+AssociatedDictionary.h
│ │ │ └── ObjcAssociatedObjectHelpers.h
│ └── Public
│ │ ├── Aspects
│ │ └── Aspects.h
│ │ ├── BlocksKit
│ │ ├── A2BlockInvocation.h
│ │ ├── A2DynamicDelegate.h
│ │ ├── BKMacros.h
│ │ ├── BlocksKit+MessageUI.h
│ │ ├── BlocksKit+UIKit.h
│ │ ├── BlocksKit.h
│ │ ├── MFMailComposeViewController+BlocksKit.h
│ │ ├── MFMessageComposeViewController+BlocksKit.h
│ │ ├── NSArray+BlocksKit.h
│ │ ├── NSCache+BlocksKit.h
│ │ ├── NSDictionary+BlocksKit.h
│ │ ├── NSIndexSet+BlocksKit.h
│ │ ├── NSInvocation+BlocksKit.h
│ │ ├── NSMutableArray+BlocksKit.h
│ │ ├── NSMutableDictionary+BlocksKit.h
│ │ ├── NSMutableIndexSet+BlocksKit.h
│ │ ├── NSMutableOrderedSet+BlocksKit.h
│ │ ├── NSMutableSet+BlocksKit.h
│ │ ├── NSObject+A2BlockDelegate.h
│ │ ├── NSObject+A2DynamicDelegate.h
│ │ ├── NSObject+BKAssociatedObjects.h
│ │ ├── NSObject+BKBlockExecution.h
│ │ ├── NSObject+BKBlockObservation.h
│ │ ├── NSOrderedSet+BlocksKit.h
│ │ ├── NSSet+BlocksKit.h
│ │ ├── NSTimer+BlocksKit.h
│ │ ├── NSURLConnection+BlocksKit.h
│ │ ├── UIActionSheet+BlocksKit.h
│ │ ├── UIAlertView+BlocksKit.h
│ │ ├── UIBarButtonItem+BlocksKit.h
│ │ ├── UIControl+BlocksKit.h
│ │ ├── UIGestureRecognizer+BlocksKit.h
│ │ ├── UIImagePickerController+BlocksKit.h
│ │ ├── UIPopoverController+BlocksKit.h
│ │ ├── UITextField+BlocksKit.h
│ │ ├── UIView+BlocksKit.h
│ │ └── UIWebView+BlocksKit.h
│ │ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraintMaker.h
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewConstraint.h
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── View+MASAdditions.h
│ │ └── View+MASShorthandAdditions.h
│ │ └── ObjcAssociatedObjectHelpers
│ │ ├── NSObject+AssociatedDictionary.h
│ │ └── ObjcAssociatedObjectHelpers.h
├── Manifest.lock
├── Masonry
│ ├── LICENSE
│ ├── Masonry
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ └── View+MASShorthandAdditions.h
│ └── README.md
├── ObjcAssociatedObjectHelpers
│ ├── LICENSE.txt
│ ├── ObjcAssociatedObjectHelpers
│ │ ├── NSObject+AssociatedDictionary.h
│ │ ├── NSObject+AssociatedDictionary.m
│ │ ├── ObjcAssociatedObjectHelpers.h
│ │ └── ObjcAssociatedObjectHelpers.m
│ └── README.md
├── Pods.xcodeproj
│ └── project.pbxproj
└── Target Support Files
│ ├── Pods-Aspects
│ ├── Pods-Aspects-Private.xcconfig
│ ├── Pods-Aspects-dummy.m
│ ├── Pods-Aspects-prefix.pch
│ └── Pods-Aspects.xcconfig
│ ├── Pods-BlocksKit
│ ├── Pods-BlocksKit-Private.xcconfig
│ ├── Pods-BlocksKit-dummy.m
│ ├── Pods-BlocksKit-prefix.pch
│ └── Pods-BlocksKit.xcconfig
│ ├── Pods-Masonry
│ ├── Pods-Masonry-Private.xcconfig
│ ├── Pods-Masonry-dummy.m
│ ├── Pods-Masonry-prefix.pch
│ └── Pods-Masonry.xcconfig
│ ├── Pods-ObjcAssociatedObjectHelpers
│ ├── Pods-ObjcAssociatedObjectHelpers-Private.xcconfig
│ ├── Pods-ObjcAssociatedObjectHelpers-dummy.m
│ ├── Pods-ObjcAssociatedObjectHelpers-prefix.pch
│ └── Pods-ObjcAssociatedObjectHelpers.xcconfig
│ └── Pods
│ ├── Pods-acknowledgements.markdown
│ ├── Pods-acknowledgements.plist
│ ├── Pods-dummy.m
│ ├── Pods-environment.h
│ ├── Pods-resources.sh
│ ├── Pods.debug.xcconfig
│ └── Pods.release.xcconfig
├── README.md
└── Untitled.gif
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/.idea/IMY_Theme.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IMY_Theme.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "IMY_Theme",
3 | "version": "1.0",
4 | "summary": "支持换肤,目前测试过的支持UITabbarItem,UIButton,UIImageView,UILabel等",
5 | "description": "支持换肤,目前测试过的支持UITabbarItem,UIButton,UIImageView,UILabel等",
6 | "homepage": "https://github.com/meiyoudev/IMY_Theme",
7 | "license": "MIT",
8 | "authors": {"Ivan": "dcty@qq.com"},
9 | "source": {"git": "https://github.com/meiyoudev/IMY_Theme.git"},
10 | "platforms": {"ios": "6.0"},
11 | "source_files": "IMY_Theme/ThemeSupport/*.{h,m}",
12 | "requires_arc": true,
13 | "dependencies": {
14 | "BlocksKit": [],
15 | "Aspects":[],
16 | "Masonry":[],
17 | "ObjcAssociatedObjectHelpers":[]
18 | }
19 | }
--------------------------------------------------------------------------------
/IMY_Theme.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IMY_Theme.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/IMY_Theme/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // IMY_Theme
4 | //
5 | // Created by Ivan Chua on 15/3/30.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/IMY_Theme/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // IMY_Theme
4 | //
5 | // Created by Ivan Chua on 15/3/30.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.h"
11 | #import "NSObject+IMY_Theme.h"
12 |
13 | @interface AppDelegate ()
14 |
15 | @end
16 |
17 | @implementation AppDelegate
18 |
19 |
20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
21 | {
22 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
23 | [_window makeKeyAndVisible];
24 | UITabBarController *tabBarController = [[UITabBarController alloc] init];
25 | ViewController *viewController = [[ViewController alloc] init];
26 | ViewController *viewController1 = [[ViewController alloc] init];
27 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
28 | UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
29 | tabBarController.viewControllers = @[nav, nav1];
30 | _window.rootViewController = tabBarController;
31 |
32 | [self addToThemeChangeObserver];
33 |
34 | return YES;
35 | }
36 |
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/IMY_Theme/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/IMY_Theme/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | im.meiyou.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/IMY_Theme/Test.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/4/3.
3 | // Copyright (c) 2015 Ivan Chua. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 |
9 | @interface Test : NSObject
10 | @end
--------------------------------------------------------------------------------
/IMY_Theme/Test.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/4/3.
3 | //
4 | //
5 |
6 |
7 | #import "Test.h"
8 |
9 |
10 | @implementation Test
11 | - (void)dealloc
12 | {
13 | NSLog(@"%s", sel_getName(_cmd));
14 | }
15 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYInvocation.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/23.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 |
9 | typedef NS_ENUM(NSInteger, IMYImageViewState)
10 | {
11 | IMYUIImageViewNormalState = 0,
12 | IMYUIImageViewHighlightedState
13 | };
14 |
15 | @interface NSInvocation (IMYTheme)
16 | @property(strong) NSString *key;
17 | @end
18 |
19 | @interface IMYInvocation : NSObject
20 |
21 | - (BOOL)shouldAddInvocation:(NSInteger)state andCMD:(SEL)cmd key:(NSString *)key;
22 |
23 | - (void)removeAddInvocationForState:(NSInteger)state andCMD:(SEL)cmd;
24 |
25 | - (void)addInvocation:(NSInvocation *)invocation cmd:(SEL)cmd forState:(NSInteger)state andKey:(NSString *)key;
26 |
27 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYInvocation.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/23.
3 | //
4 | //
5 |
6 |
7 | #import "IMYInvocation.h"
8 | #import "NSArray+BlocksKit.h"
9 | #import "ObjcAssociatedObjectHelpers.h"
10 |
11 | @implementation NSInvocation(IMYTheme)
12 | SYNTHESIZE_ASC_OBJ(key, setKey)
13 | @end
14 |
15 | @interface IMYInvocation ()
16 | @property(nonatomic, strong) NSMutableDictionary *selDict;
17 | @end
18 |
19 | @implementation IMYInvocation
20 |
21 | - (instancetype)init
22 | {
23 | self = [super init];
24 | if (self)
25 | {
26 | _selDict = [[NSMutableDictionary alloc] init];
27 | }
28 | return self;
29 | }
30 |
31 | - (BOOL)shouldAddInvocation:(NSInteger)state andCMD:(SEL)cmd key:(NSString *)key
32 | {
33 | NSString *selString = NSStringFromSelector(cmd);
34 | NSMutableDictionary *dict = _selDict[selString];
35 | NSInvocation *invocation = dict[@(state)];
36 | if (!invocation)
37 | {
38 | return YES;
39 | }
40 | else
41 | {
42 | return ![invocation.key isEqualToString:key];
43 | }
44 | }
45 |
46 | -(void)removeAddInvocationForState:(NSInteger)state andCMD:(SEL)cmd
47 | {
48 | NSString *selString = NSStringFromSelector(cmd);
49 | NSMutableDictionary *dict = _selDict[selString];
50 | dict[@(state)] = nil;
51 | }
52 |
53 | - (void)addInvocation:(NSInvocation *)invocation cmd:(SEL)cmd forState:(NSInteger)state andKey:(NSString *)key
54 | {
55 | NSMutableDictionary *mapTable = [self dictOfSEL:cmd];
56 | invocation.key = key;
57 | mapTable[@(state)] = invocation;
58 | }
59 |
60 |
61 | - (NSMutableDictionary *)dictOfSEL:(SEL)sel
62 | {
63 | NSString *selString = NSStringFromSelector(sel);
64 | NSMutableDictionary *dict = _selDict[selString];
65 | if (!dict)
66 | {
67 | dict = [[NSMutableDictionary alloc] init];
68 | _selDict[selString] = dict;
69 | }
70 | return dict;
71 | }
72 |
73 |
74 | - (void)invoke
75 | {
76 | [_selDict.allValues bk_each:^(NSDictionary *dictionary) {
77 | [dictionary.allValues makeObjectsPerformSelector:@selector(invoke)];
78 | }];
79 | }
80 |
81 | - (void)dealloc
82 | {
83 | NSLog(@"MYI");
84 | }
85 |
86 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYSetImageProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/24.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @protocol IMYSetImageProtocol
9 | @optional
10 | - (void)_imy_setImageForKey:(NSString *)key forState:(NSInteger)state;
11 |
12 | - (void)_imy_setImageForKey:(NSString *)key usingCache:(BOOL)usingCache forState:(NSInteger)state;
13 |
14 | - (void)_imy_setCenterResizeImageForKey:(NSString *)key forState:(NSInteger)state;
15 |
16 | - (void)_imy_setCenterResizeImageForKey:(NSString *)key usingCache:(BOOL)usingCache forState:(NSInteger)state;
17 |
18 | - (void)_imy_setImageForKey:(NSString *)key resizableImageWithCapInsets:(UIEdgeInsets)capInsets forState:(NSInteger)state;
19 |
20 | - (void)_imy_setImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(NSInteger)state;
21 |
22 | - (void)_imy_setImageForKey:(NSString *)key usingCache:(BOOL)usingCache stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(NSInteger)state;
23 |
24 | - (void)_imy_setImageForKey:(NSString *)key usingCache:(BOOL)usingCache resizableImageWithCapInsets:(UIEdgeInsets)capInsets forState:(NSInteger)state;
25 |
26 | - (void)_imy_setBackgroundImageForKey:(NSString *)key forState:(NSInteger)state;
27 |
28 | - (void)_imy_setBackgroundImageForKey:(NSString *)key usingCache:(BOOL)usingCache forState:(NSInteger)state;
29 |
30 | - (void)_imy_setCenterResizeBackgroundImageForKey:(NSString *)key forState:(NSInteger)state;
31 |
32 | - (void)_imy_setCenterResizeBackgroundImageForKey:(NSString *)key usingCache:(BOOL)usingCache forState:(NSInteger)state;
33 |
34 | - (void)_imy_setBackgroundImageForKey:(NSString *)key resizableImageWithCapInsets:(UIEdgeInsets)capInsets forState:(NSInteger)state;
35 |
36 | - (void)_imy_setBackgroundImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(NSInteger)state;
37 |
38 | - (void)_imy_setBackgroundImageForKey:(NSString *)key usingCache:(BOOL)usingCache stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(NSInteger)state;
39 |
40 | - (void)_imy_setBackgroundImageForKey:(NSString *)key usingCache:(BOOL)usingCache resizableImageWithCapInsets:(UIEdgeInsets)capInsets forState:(NSInteger)state;
41 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYThemeColorMacros.h:
--------------------------------------------------------------------------------
1 | //
2 | // IMYThemeColorMacros.h
3 | // IMY_Theme
4 | //
5 | // Created by ljh on 15/4/22.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #ifndef IMY_COLOR_KEY
10 |
11 | #define IMY_COLOR_KEY(key) [[IMYThemeManager sharedIMYThemeManager] colorForKey:key]
12 |
13 | #define IMY_RED @"SY_RED"
14 | #define IMY_BLACK @"SY_BLACK"
15 | #define IMY_GREY @"SY_GREY"
16 | #define IMY_BROWN @"SY_BROWN"
17 |
18 | #define IMY_COLOR_RED IMY_COLOR_KEY(IMY_RED)
19 | #define IMY_COLOR_BLACK IMY_COLOR_KEY(IMY_BLACK)
20 | #define IMY_COLOR_GREY IMY_COLOR_KEY(IMY_GREY)
21 | #define IMY_COLOR_BROWN IMY_COLOR_KEY(IMY_BROWN)
22 |
23 | #endif
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYThemeConfig.h:
--------------------------------------------------------------------------------
1 |
2 | #import "IMYInvocation.h"
3 | #import "IMYThemeImageCache.h"
4 | #import "IMYThemeManager.h"
5 | #import "NSObject+IMY_Theme.h"
6 | #import "UIButton+IMY_Theme.h"
7 | #import "UIImage+IMY_Theme.h"
8 | #import "UIImageView+IMY_Theme.h"
9 | #import "UITabBarItem+IMY_Theme.h"
10 |
11 | #import "IMYThemeColorMacros.h"
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYThemeImageCache.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/20.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | /**
10 | * 主题的图片缓存
11 | */
12 | @interface IMYThemeImageCache : NSCache
13 | + (IMYThemeImageCache *)sharedIMYThemeImageCache;
14 |
15 | - (void)clear;
16 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYThemeImageCache.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/20.
3 | //
4 | //
5 |
6 |
7 | #import "IMYThemeImageCache.h"
8 |
9 |
10 | @implementation IMYThemeImageCache
11 |
12 | static IMYThemeImageCache *_sharedIMYThemeImageCache = nil;
13 |
14 | + (IMYThemeImageCache *)sharedIMYThemeImageCache
15 | {
16 | static dispatch_once_t singleton;
17 | dispatch_once(&singleton, ^{
18 | _sharedIMYThemeImageCache = [[self alloc] init];
19 | });
20 | return _sharedIMYThemeImageCache;
21 | }
22 |
23 | - (instancetype)init
24 | {
25 | self = [super init];
26 | if (self)
27 | {
28 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(clear) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
29 | }
30 |
31 | return self;
32 | }
33 |
34 | - (void)dealloc
35 | {
36 | [[NSNotificationCenter defaultCenter] removeObserver:self];
37 | }
38 |
39 |
40 | - (void)setObject:(id)obj forKey:(id)key
41 | {
42 | if (key)
43 | {
44 | if (!obj)
45 | {
46 | [self removeObjectForKey:key];
47 | }
48 | else
49 | {
50 | [super setObject:obj forKey:key];
51 | }
52 | }
53 | }
54 |
55 | - (void)clear
56 | {
57 | [self removeAllObjects];
58 | }
59 |
60 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMYThemeManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/20.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 |
10 | @interface IMYThemeManager : NSObject
11 |
12 | @property(nonatomic, copy) NSString *themePath;
13 |
14 | + (IMYThemeManager *)sharedIMYThemeManager;
15 |
16 | /**
17 | * @brief 添加别的配置文件名进来 相同key 后加入的配置会覆盖之前的
18 | *
19 | * @param configName 配置文件的完整名字
20 | */
21 | -(void)addConfigFileName:(NSString*)configName;
22 |
23 | /**
24 | * @brief 返回图片名相对应的资源路径,根据皮肤路径(themePath)来的
25 | * 如果,主题中没有,则会读取mainBundle中的
26 | *
27 | * @param key 图片名
28 | */
29 | - (NSString *)imageResourcePathForKey:(NSString *)key;
30 |
31 | - (UIColor *)colorForKey:(NSString *)key;
32 |
33 | /**
34 | * @brief 需要实现 imy_themeChanged方法
35 | */
36 | - (void)addThemeChangeObserver:(id)object;
37 |
38 | - (void)themeDidChanged;
39 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMY_SDWebImage/NSString+IMY_WebImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/25.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | typedef NS_ENUM(NSInteger, IMY_QiNiu_ImageType)
10 | {
11 | IMY_QiNiu_None = 0,
12 | IMY_QiNiu_JPG,
13 | IMY_QiNiu_PNG,
14 | IMY_QiNiu_WEBP,
15 | IMY_QiNiu_GIF
16 | };
17 |
18 | static inline NSString *IMY_QiNiuImageType(IMY_QiNiu_ImageType type) {
19 | switch (type)
20 | {
21 | case IMY_QiNiu_PNG:
22 | {
23 | return @"png";
24 | }
25 | case IMY_QiNiu_WEBP:
26 | {
27 | return @"webp";
28 | }
29 | case IMY_QiNiu_GIF:
30 | {
31 | return @"gif";
32 | }
33 | case IMY_QiNiu_JPG:
34 | {
35 | return @"jpg";
36 | }
37 | default:
38 | {
39 | return @"";
40 | }
41 | }
42 | }
43 |
44 |
45 | @interface NSString (IMY_WebImage)
46 | + (NSString *)qiniuURL:(id)URL resize:(CGSize)size quality:(NSInteger)quality type:(IMY_QiNiu_ImageType)type;
47 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMY_SDWebImage/NSString+IMY_WebImage.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/25.
3 | //
4 | //
5 |
6 |
7 | #import "NSString+IMY_WebImage.h"
8 | #import "ObjcAssociatedObjectHelpers.h"
9 |
10 |
11 | @implementation NSString (IMY_WebImage)
12 |
13 | + (NSString *)qiniuURL:(id)URL resize:(CGSize)size quality:(int)quality type:(IMY_QiNiu_ImageType)type
14 | {
15 | NSString *urlString = nil;
16 | if ([URL isKindOfClass:[NSURL class]])
17 | {
18 | NSURL *url = (NSURL *) URL;
19 | urlString = url.absoluteString;
20 | }
21 | else if ([URL isKindOfClass:[NSString class]])
22 | {
23 | NSString *string = (NSString *) URL;
24 | urlString = string;
25 | }
26 | else
27 | {
28 | return nil;
29 | }
30 | NSMutableString *returnMe = [[NSMutableString alloc] initWithString:urlString];
31 | [returnMe appendString:@"?imageView2/1"];
32 | if (!CGSizeEqualToSize(CGSizeZero, size))
33 | {
34 | [returnMe appendFormat:@"/h/%d/w/%d", (int) size.height, (int) size.width];
35 | }
36 | if ((quality > 0 && quality < 100))
37 | {
38 | [returnMe appendFormat:@"/q/%d", quality];
39 | }
40 | if (type != IMY_QiNiu_None)
41 | {
42 | [returnMe appendFormat:@"/format/%@", IMY_QiNiuImageType(type)];
43 | }
44 | return returnMe;
45 | }
46 |
47 |
48 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/IMY_SDWebImage/UIImageView+IMY_WebImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/24.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 | #import "NSString+IMY_WebImage.h"
9 | #import "NSObject+IMY_Theme.h"
10 |
11 | @protocol IMY_WebImageProgressProtocol;
12 |
13 | /**
14 | * @brief 网络图片下载,用的是SDWebImage这个库
15 | * 支持图片下载中的图片和显示模式
16 | * 支持图片下载失败的图片和显示模式
17 | * 支持进度条,进度条到时候随便换就是了
18 | * 支持设置背景颜色的key
19 | * 以上的资源都默认支持了换肤,不需要关心换肤后的设置
20 | */
21 | @interface UIImageView (IMY_WebImage)
22 |
23 | @property UIViewContentMode downloadContentMode UI_APPEARANCE_SELECTOR;
24 | @property UIViewContentMode failureContentMode UI_APPEARANCE_SELECTOR;
25 | @property BOOL showProgress;
26 | @property(copy) NSString *placeholderImageName UI_APPEARANCE_SELECTOR;
27 | @property(copy) NSString *failureImageName UI_APPEARANCE_SELECTOR;
28 | @property(copy) NSString *backgroundColorKey UI_APPEARANCE_SELECTOR;
29 | @property(strong) UIView *progressView;
30 |
31 |
32 | /**
33 | * @brief 下载图片
34 | * @param URL 可以是NSString 也可以是 NSURL
35 | */
36 | - (void)imy_setImageURL:(id)URL;
37 |
38 | /**
39 | * @brief 下载图片,并且根据试图的大小,自动在七牛的API上加载裁剪的功能.
40 | */
41 |
42 | - (void)imy_setImageURL:(id)URL quality:(NSInteger)quality;
43 |
44 | - (void)imy_setImageURL:(id)URL resise:(CGSize)size;
45 |
46 | - (void)imy_setImageURL:(id)URL resise:(CGSize)size quality:(NSInteger)quality;
47 |
48 | - (void)imy_setImageURL:(id)URL resise:(CGSize)size quality:(NSInteger)quality type:(IMY_QiNiu_ImageType)type;
49 |
50 |
51 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/NSObject+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/23.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 | #import "IMYSetImageProtocol.h"
9 |
10 | #define IMYBlockWeakObject(o) __typeof__(o) __weak
11 | #define IMYBlockWeakSelf IMYBlockWeakObject(self)
12 | #define IMYBlockWeakToWeakSelf IMYBlockWeakSelf weakSelf = self;
13 |
14 | @protocol IMY_ThemeChangeProtocol
15 | @required
16 | - (void)imy_themeChanged;
17 | @end
18 |
19 | @class IMYInvocation;
20 |
21 | @interface NSObject (IMY_Theme)
22 |
23 | @property(nonatomic, strong) IMYInvocation *imyInvocation;
24 |
25 |
26 | + (void)imy_invoke;
27 |
28 | - (void)addToThemeChangeObserver;
29 |
30 | - (void)addInvocationWithBlock:(NSInvocation *(^)(void))block andCMD:(SEL)cmd key:(NSString *)key;
31 |
32 | - (void)addInvocationWithBlock:(NSInvocation *(^)(void))block andCMD:(SEL)cmd forState:(NSInteger)state key:(NSString *)key;
33 |
34 | @end
35 |
36 | @interface UIView (IMY_Theme_BackgroundColor)
37 | - (void)imy_setBackgroundColorForKey:(NSString *)key;
38 |
39 | - (void)imy_setTextColorForKey:(NSString *)key;
40 |
41 | - (void)imy_setHighlightedTextColorForKey:(NSString *)key;
42 | @end
43 |
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/NSString+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/30.
3 | // Copyright (c) 2015 Ivan Chua. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface NSString (IMY_Theme)
9 | - (NSString *)imy_relativePath;
10 | - (NSString *)imy_fullPath;
11 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/NSString+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/30.
3 | //
4 | //
5 |
6 |
7 | #import "NSString+IMY_Theme.h"
8 |
9 |
10 | @implementation NSString (IMY_Theme)
11 |
12 | static NSString *BundleExecutableName = nil;
13 | static NSString *Home_Prefix = @"Containers/Data/Application/";
14 |
15 | + (instancetype)BundleExecutableName
16 | {
17 | if (!BundleExecutableName)
18 | {
19 | BundleExecutableName = [NSString stringWithFormat:@"%@.app", [[NSBundle mainBundle] infoDictionary][(__bridge id) kCFBundleExecutableKey]];
20 | }
21 | return BundleExecutableName;
22 | }
23 |
24 | - (NSString *)imy_relativePath;
25 | {
26 | NSString *relativePath = nil;
27 | NSRange range = [self rangeOfString:[NSString BundleExecutableName]];
28 | if (range.location == NSNotFound)
29 | {
30 | range = [self rangeOfString:Home_Prefix];
31 | }
32 | if (range.location != NSNotFound)
33 | {
34 | NSUInteger index = range.length + range.location + 1;
35 | if (self.length > index - 1)
36 | {
37 | relativePath = [self substringFromIndex:index];
38 | }
39 | }
40 | return relativePath;
41 | }
42 |
43 | - (NSString *)imy_fullPath
44 | {
45 | NSString *relativePath = self.imy_relativePath;
46 | if (!relativePath)
47 | {
48 | relativePath = [[NSString alloc] initWithString:self];
49 | }
50 |
51 | NSString *fullPath = [NSHomeDirectory() stringByAppendingPathComponent:relativePath];
52 | if (!fullPath.imy_exist)
53 | {
54 | fullPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:relativePath];
55 | }
56 | return fullPath.imy_exist ? fullPath : nil;
57 | }
58 |
59 | - (BOOL)imy_exist
60 | {
61 | return [[NSFileManager defaultManager] fileExistsAtPath:self];
62 | }
63 |
64 |
65 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIButton+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/24.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | @interface UIButton (IMY_Theme)
10 |
11 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state;
12 |
13 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
14 |
15 | - (void)imy_setCenterResizeImageForKey:(NSString *)key andState:(UIControlState)state;
16 |
17 | - (void)imy_setBackgroundImageForKey:(NSString *)key andState:(UIControlState)state;
18 |
19 | - (void)imy_setCenterResiseBackgroudImageForKey:(NSString *)key andState:(UIControlState)state;
20 |
21 | - (void)imy_setBackgroudImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(UIControlState)state;
22 |
23 | - (void)imy_setTitleColorForKey:(NSString *)key andState:(UIControlState)state;
24 |
25 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIButton+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/24.
3 | //
4 | //
5 |
6 |
7 | #import "UIButton+IMY_Theme.h"
8 | #import "NSObject+IMY_Theme.h"
9 | #import "IMYThemeManager.h"
10 | #import "NSInvocation+BlocksKit.h"
11 | #import "UIColor+IMY_Theme.h"
12 |
13 |
14 | @implementation UIButton (IMY_Theme)
15 |
16 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state
17 | {
18 | [(id )self _imy_setImageForKey:key forState:state];
19 | }
20 |
21 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight
22 | {
23 | [(id )self _imy_setImageForKey:key stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:topCapHeight forState:state];
24 | }
25 |
26 | - (void)imy_setCenterResizeImageForKey:(NSString *)key andState:(UIControlState)state
27 | {
28 | [(id )self _imy_setCenterResizeImageForKey:key forState:state];
29 | }
30 |
31 | - (void)imy_setBackgroundImageForKey:(NSString *)key andState:(UIControlState)state
32 | {
33 | [(id )self _imy_setBackgroundImageForKey:key forState:state];
34 | }
35 |
36 | - (void)imy_setCenterResiseBackgroudImageForKey:(NSString *)key andState:(UIControlState)state
37 | {
38 | [(id )self _imy_setCenterResizeBackgroundImageForKey:key forState:state];
39 | }
40 |
41 | - (void)imy_setBackgroudImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(UIControlState)state
42 | {
43 | [(id )self _imy_setBackgroundImageForKey:key stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:topCapHeight forState:state];
44 | }
45 |
46 | - (void)imy_setTitleColorForKey:(NSString *)key andState:(UIControlState)state
47 | {
48 | UIColor *color = [UIColor imy_colorForKey:key];
49 | [self setTitleColor:color forState:state];
50 | IMYBlockWeakToWeakSelf
51 | [self addInvocationWithBlock:^NSInvocation * {
52 | return [NSInvocation bk_invocationWithTarget:weakSelf block:^(id target) {
53 | [target imy_setTitleColorForKey:key andState:state];
54 | }];
55 | } andCMD:_cmd forState:state key:key];
56 | }
57 |
58 |
59 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIColor+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/25.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | @interface UIColor (IMY_Theme)
10 | + (UIColor *)imy_colorForKey:(NSString *)key;
11 | + (UIColor *)imy_colorWithHexString:(id)hexString;
12 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIImage+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/20.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface UIImage (IMY_Theme)
9 |
10 | /**
11 | * @brief 通过图片名来获取图片,默认使用缓存
12 | * @param key 图片的名字,如 icon.png icon.jpg icon
13 | */
14 | + (instancetype)imy_imageForKey:(NSString *)key;
15 |
16 | /**
17 | * @brief 通过图片名来获取图片
18 | * @param key 图片的名字,如 icon.png icon.jpg icon
19 | * @param usingCache 是否使用缓存
20 | */
21 | + (instancetype)imy_imageForKey:(NSString *)key usingCache:(BOOL)usingCache;
22 |
23 | /**
24 | * @brief 图片从中间拉伸
25 | */
26 | - (instancetype)imy_resizableImageCenter;
27 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIImage+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/20.
3 | //
4 | //
5 |
6 |
7 | #import "UIImage+IMY_Theme.h"
8 | #import "IMYThemeManager.h"
9 | #import "IMYThemeImageCache.h"
10 |
11 |
12 | @implementation UIImage (IMY_Theme)
13 |
14 | + (instancetype)imy_imageForKey:(NSString *)key
15 | {
16 | return [self imy_imageForKey:key usingCache:YES];
17 | }
18 |
19 | + (instancetype)imy_imageForKey:(NSString *)key usingCache:(BOOL)usingCache
20 | {
21 | //获取后缀,如果没有后缀,就拼接上png,也就是说,除了png可以不写,其他的都要写。
22 | NSString *ext = key.pathExtension;
23 | if (ext.length == 0 || !ext)
24 | {
25 | key = [key stringByAppendingPathExtension:@"png"];
26 | }
27 | //获取资源的路径,如果皮肤包内没有的话,就用mainBundle里面的
28 | NSString *imagePath = [[IMYThemeManager sharedIMYThemeManager] imageResourcePathForKey:key];
29 | //从缓存里面先拿,拿不到再去读
30 | UIImage *image = [[IMYThemeImageCache sharedIMYThemeImageCache] objectForKey:imagePath];
31 | if (!image)
32 | {
33 | image = [[UIImage alloc] initWithContentsOfFile:imagePath];
34 | }
35 | if (usingCache)
36 | {
37 | [[IMYThemeImageCache sharedIMYThemeImageCache] setObject:image forKey:imagePath];
38 | }
39 | return image;
40 | }
41 |
42 | - (instancetype)imy_resizableImageCenter
43 | {
44 | CGSize imageSize = self.size;
45 | CGFloat centerX = imageSize.width / 2;
46 | CGFloat centerY = imageSize.height / 2;
47 | UIEdgeInsets edgeInsets = UIEdgeInsetsMake(centerY - 0.5f, centerX - 0.5f, centerY + 0.5f, centerX + 0.5f);
48 | return [self resizableImageWithCapInsets:edgeInsets];
49 | }
50 |
51 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIImageView+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/24.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | @interface UIImageView (IMY_Theme)
10 | - (void)imy_setImageForKey:(NSString *)key;
11 |
12 | - (void)imy_setHighlightedImageForKey:(NSString *)key;
13 |
14 | - (void)imy_setImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
15 |
16 | - (void)imy_setHighlightedImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
17 |
18 | - (void)imy_setCenterResizeImageForKey:(NSString *)key;
19 |
20 | - (void)imy_setCenterResizeHighlightedImageForKey:(NSString *)key;
21 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UIImageView+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/24.
3 | //
4 | //
5 |
6 |
7 | #import "UIImageView+IMY_Theme.h"
8 | #import "NSObject+IMY_Theme.h"
9 | #import "IMYInvocation.h"
10 |
11 | @implementation UIImageView (IMY_Theme)
12 | - (void)imy_setImageForKey:(NSString *)key
13 | {
14 | [(id ) self _imy_setImageForKey:key forState:IMYUIImageViewNormalState];
15 | }
16 |
17 | - (void)imy_setHighlightedImageForKey:(NSString *)key
18 | {
19 | [(id ) self _imy_setImageForKey:key forState:IMYUIImageViewHighlightedState];
20 | }
21 |
22 | - (void)imy_setImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight
23 | {
24 | [(id ) self _imy_setImageForKey:key stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:topCapHeight forState:IMYUIImageViewNormalState];
25 | }
26 |
27 | - (void)imy_setHighlightedImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight
28 | {
29 | [(id ) self _imy_setImageForKey:key stretchableImageWithLeftCapWidth:leftCapWidth topCapHeight:topCapHeight forState:IMYUIImageViewHighlightedState];
30 | }
31 |
32 | - (void)imy_setCenterResizeImageForKey:(NSString *)key
33 | {
34 | [(id ) self _imy_setCenterResizeImageForKey:key forState:IMYUIImageViewNormalState];
35 | }
36 |
37 | - (void)imy_setCenterResizeHighlightedImageForKey:(NSString *)key
38 | {
39 | [(id ) self _imy_setCenterResizeImageForKey:key forState:IMYUIImageViewHighlightedState];
40 | }
41 |
42 |
43 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UINavigationBar+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/4/1.
3 | // Copyright (c) 2015 Ivan Chua. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | @interface UINavigationBar (IMY_Theme)
10 | - (void)imy_setBackgroundImageWithKey:(NSString *)key forBarMetrics:(UIBarMetrics)barMetrics;
11 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UINavigationBar+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/4/1.
3 | //
4 | //
5 |
6 |
7 | #import "UINavigationBar+IMY_Theme.h"
8 | #import "UIImage+IMY_Theme.h"
9 | #import "NSObject+IMY_Theme.h"
10 | #import "NSInvocation+BlocksKit.h"
11 |
12 |
13 | @implementation UINavigationBar (IMY_Theme)
14 | - (void)imy_setBackgroundImageWithKey:(NSString *)key forBarMetrics:(UIBarMetrics)barMetrics
15 | {
16 | IMYBlockWeakToWeakSelf
17 | [self setBackgroundImage:[UIImage imy_imageForKey:key] forBarMetrics:barMetrics];
18 | [self addInvocationWithBlock:^NSInvocation * {
19 | return [NSInvocation bk_invocationWithTarget:weakSelf block:^(id target) {
20 | [target imy_setBackgroundImageWithKey:key forBarMetrics:barMetrics];
21 | }];
22 | } andCMD:_cmd forState:barMetrics key:key];
23 | }
24 |
25 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UITabBarItem+IMY_Theme.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan Chua on 15/3/24.
3 | // Copyright (c) 2015 MeiYou. All rights reserved.
4 | //
5 |
6 | #import
7 | #import
8 |
9 | @interface UITabBarItem (IMY_Theme)
10 |
11 | - (void)imy_setFinishedSelectedImageName:(NSString *)selectedImageName withFinishedUnselectedImageName:(NSString *)unselectedImageName;
12 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ThemeSupport/UITabBarItem+IMY_Theme.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Ivan on 15/3/24.
3 | //
4 | //
5 |
6 |
7 | #import "UITabBarItem+IMY_Theme.h"
8 | #import "UIImage+IMY_Theme.h"
9 | #import "NSObject+IMY_Theme.h"
10 | #import "NSInvocation+BlocksKit.h"
11 |
12 |
13 | @implementation UITabBarItem (IMY_Theme)
14 | - (void)imy_setFinishedSelectedImageName:(NSString *)selectedImageName withFinishedUnselectedImageName:(NSString *)unselectedImageName
15 | {
16 | UIImage *selectedImage = [UIImage imy_imageForKey:selectedImageName];
17 | UIImage *unSelectedImage = [UIImage imy_imageForKey:unselectedImageName];
18 | if ([selectedImage respondsToSelector:@selector(imageWithRenderingMode:)])
19 | {
20 | selectedImage = [selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
21 | unSelectedImage = [unSelectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
22 | }
23 | #pragma clang diagnostic push
24 | #pragma clang diagnostic ignored "-Wdeprecated-declarations"
25 | [self setFinishedSelectedImage:selectedImage withFinishedUnselectedImage:unSelectedImage];
26 | #pragma clang diagnostic pop
27 | IMYBlockWeakToWeakSelf
28 | [self addInvocationWithBlock:^NSInvocation * {
29 | return [NSInvocation bk_invocationWithTarget:weakSelf block:^(id target) {
30 | [target imy_setFinishedSelectedImageName:selectedImageName withFinishedUnselectedImageName:unselectedImageName];
31 | }];
32 | } andCMD:_cmd key:[selectedImageName stringByAppendingString:unselectedImageName]];
33 | }
34 | @end
--------------------------------------------------------------------------------
/IMY_Theme/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // IMY_Theme
4 | //
5 | // Created by Ivan Chua on 15/3/30.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou_up.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou_up@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou_up@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottommeetyou_up@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottommeetyou_up@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews_up.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews_up@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews_up@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/all_bottomnews_up@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/all_bottomnews_up@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/chat_pinkbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/chat_pinkbg.png
--------------------------------------------------------------------------------
/IMY_Theme/chat_pinkbg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/chat_pinkbg@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/chat_pinkbg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/chat_pinkbg@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "color":{
3 | "SY_BROWN": "#b0d25b",
4 | "SY_GREY": "#d099d0",
5 | "SY_BLACK": "#00ff00",
6 | "SY_RED": "#ffffff",
7 | "SY_BG":"#ff00ff"
8 | }
9 | }
--------------------------------------------------------------------------------
/IMY_Theme/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // IMY_Theme
4 | //
5 | // Created by Ivan Chua on 15/3/30.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/IMY_Theme/nav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/nav.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou_up.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou_up@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou_up@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottommeetyou_up@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottommeetyou_up@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews_up.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews_up@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews_up@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/all_bottomnews_up@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/all_bottomnews_up@3x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/chat_pinkbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/chat_pinkbg.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/chat_pinkbg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/chat_pinkbg@2x.png
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "color": {
3 | "SY_BROWN": "#c3a582",
4 | "SY_GREY": "#a09a95",
5 | "SY_BLACK": "#6c6155",
6 | "SY_RED": "#ff5073",
7 | "SY_BG": "#00ff00"
8 | }
9 | }
--------------------------------------------------------------------------------
/IMY_Theme/theme2.bundle/nav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/IMY_Theme/theme2.bundle/nav.png
--------------------------------------------------------------------------------
/IMY_ThemeTests/IMY_ThemeTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // IMY_ThemeTests.m
3 | // IMY_ThemeTests
4 | //
5 | // Created by Ivan Chua on 15/3/30.
6 | // Copyright (c) 2015年 Ivan Chua. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface IMY_ThemeTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation IMY_ThemeTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/IMY_ThemeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | im.meiyou.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 meiyoudev
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 |
23 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '6.0'
2 | pod 'BlocksKit'
3 | pod 'Aspects'
4 | pod 'Masonry'
5 | pod 'ObjcAssociatedObjectHelpers'
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Aspects (1.4.1)
3 | - BlocksKit (2.2.5):
4 | - BlocksKit/All (= 2.2.5)
5 | - BlocksKit/All (2.2.5):
6 | - BlocksKit/Core
7 | - BlocksKit/DynamicDelegate
8 | - BlocksKit/MessageUI
9 | - BlocksKit/UIKit
10 | - BlocksKit/Core (2.2.5)
11 | - BlocksKit/DynamicDelegate (2.2.5)
12 | - BlocksKit/MessageUI (2.2.5):
13 | - BlocksKit/Core
14 | - BlocksKit/DynamicDelegate
15 | - BlocksKit/UIKit (2.2.5):
16 | - BlocksKit/Core
17 | - BlocksKit/DynamicDelegate
18 | - Masonry (0.6.1)
19 | - ObjcAssociatedObjectHelpers (2.0.0):
20 | - ObjcAssociatedObjectHelpers/Core (= 2.0.0)
21 | - ObjcAssociatedObjectHelpers/NSObject+Dictionary (= 2.0.0)
22 | - ObjcAssociatedObjectHelpers/Core (2.0.0)
23 | - ObjcAssociatedObjectHelpers/NSObject+Dictionary (2.0.0):
24 | - ObjcAssociatedObjectHelpers/Core
25 |
26 | DEPENDENCIES:
27 | - Aspects
28 | - BlocksKit
29 | - Masonry
30 | - ObjcAssociatedObjectHelpers
31 |
32 | SPEC CHECKSUMS:
33 | Aspects: 7595ba96a6727a58ebcbfc954497fc5d2fdde546
34 | BlocksKit: 7f422b971407001178d181a43b99014ea2591fe6
35 | Masonry: 4972309f2f134de9dd312f4dc4a21359b50e6caa
36 | ObjcAssociatedObjectHelpers: 17b4253952858ff98a31b2a9fbe672294e43bf92
37 |
38 | COCOAPODS: 0.36.1
39 |
--------------------------------------------------------------------------------
/Pods/Aspects/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Peter Steinberger, steipete@gmail.com
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.
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/BlocksKit+MessageUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // BlocksKit+MessageUI
3 | //
4 | // The Objective-C block utilities you always wish you had.
5 | //
6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski
7 | // Copyright (c) 2012-2013 Pandamonia LLC
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 | //
27 |
28 | #import
29 | #import
30 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/BlocksKit+UIKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // BlocksKit+UIKit
3 | //
4 | // The Objective-C block utilities you always wish you had.
5 | //
6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski
7 | // Copyright (c) 2012-2013 Pandamonia LLC
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 | //
27 |
28 | #import
29 | #import
30 | #import
31 | #import
32 | #import
33 | #import
34 | #import
35 | #import
36 | #import
37 | #import
38 | #import
39 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // BlocksKit
3 | //
4 | // The Objective-C block utilities you always wish you had.
5 | //
6 | // Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski
7 | // Copyright (c) 2012-2013 Pandamonia LLC
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining a copy
10 | // of this software and associated documentation files (the "Software"), to deal
11 | // in the Software without restriction, including without limitation the rights
12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | // copies of the Software, and to permit persons to whom the Software is
14 | // furnished to do so, subject to the following conditions:
15 | //
16 | // The above copyright notice and this permission notice shall be included in
17 | // all copies or substantial portions of the Software.
18 | //
19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | // THE SOFTWARE.
26 | //
27 |
28 | #import
29 | #import
30 | #import
31 | #import
32 | #import
33 | #import
34 | #import
35 | #import
36 | #import
37 | #import
38 | #import
39 | #import
40 | #import
41 | #import
42 | #import
43 | #import
44 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/BKMacros.h:
--------------------------------------------------------------------------------
1 | //
2 | // BKMacros.h
3 | // BlocksKit
4 | //
5 | // Includes code by Michael Ash. .
6 | //
7 |
8 | #import "NSArray+BlocksKit.h"
9 | #import "NSSet+BlocksKit.h"
10 | #import "NSDictionary+BlocksKit.h"
11 | #import "NSIndexSet+BlocksKit.h"
12 |
13 | #ifndef __BLOCKSKIT_MACROS__
14 | #define __BLOCKSKIT_MACROS__
15 |
16 | #define __BK_EACH_WRAPPER(...) (^{ __block CFMutableDictionaryRef BK_eachTable = nil; \
17 | (void)BK_eachTable; \
18 | __typeof__(__VA_ARGS__) BK_retval = __VA_ARGS__; \
19 | if(BK_eachTable) \
20 | CFRelease(BK_eachTable); \
21 | return BK_retval; \
22 | }())
23 |
24 | #define __BK_EACH_WRAPPER_VOID(...) (^{ __block CFMutableDictionaryRef BK_eachTable = nil; \
25 | (void)BK_eachTable; \
26 | __VA_ARGS__; \
27 | if(BK_eachTable) \
28 | CFRelease(BK_eachTable); \
29 | }())
30 |
31 | #define BK_EACH(collection, ...) __BK_EACH_WRAPPER_VOID([collection bk_each:^(id obj) { __VA_ARGS__ }])
32 | #define BK_MAP(collection, ...) __BK_EACH_WRAPPER([collection bk_map:^id(id obj) { return (__VA_ARGS__); }])
33 | #define BK_SELECT(collection, ...) __BK_EACH_WRAPPER([collection bk_select: ^BOOL (id obj) { return (__VA_ARGS__) != 0; }])
34 | #define BK_REJECT(collection, ...) __BK_EACH_WRAPPER([collection bk_select: ^BOOL (id obj) { return (__VA_ARGS__) == 0; }])
35 | #define BK_MATCH(collection, ...) __BK_EACH_WRAPPER([collection bk_match: ^BOOL (id obj) { return (__VA_ARGS__) != 0; }])
36 | #define BK_REDUCE(collection, initial, ...) __BK_EACH_WRAPPER([collection bk_reduce: (initial) withBlock: ^id (id a, id b) { return (__VA_ARGS__); }])
37 |
38 | // BK_APPLY is not wrapped, because we don't guarantee that the order matches the current collection during parallel execution.
39 | #define BK_APPLY(collection, ...) [collection bk_apply:^(id obj) { __VA_ARGS__ }]
40 |
41 | static inline id BKNextHelper(NSArray *array, CFMutableDictionaryRef *eachTablePtr) {
42 |
43 | if (!*eachTablePtr) {
44 | CFDictionaryKeyCallBacks keycb = {
45 | 0,
46 | kCFTypeDictionaryKeyCallBacks.retain,
47 | kCFTypeDictionaryKeyCallBacks.release,
48 | kCFTypeDictionaryKeyCallBacks.copyDescription,
49 | NULL,
50 | NULL
51 | };
52 | *eachTablePtr = CFDictionaryCreateMutable(NULL, 0, &keycb, &kCFTypeDictionaryValueCallBacks);
53 | }
54 |
55 | NSEnumerator *enumerator = (__bridge id)CFDictionaryGetValue(*eachTablePtr, (__bridge CFArrayRef)array);
56 | if (!enumerator) {
57 | enumerator = [array objectEnumerator];
58 | CFDictionarySetValue(*eachTablePtr, (__bridge CFArrayRef)array, (__bridge void *)enumerator);
59 | }
60 | return [enumerator nextObject];
61 | }
62 |
63 | #define BK_NEXT(array) BKNextHelper(array, &BK_eachTable)
64 |
65 | #ifndef EACH
66 | #define EACH BK_EACH
67 | #endif
68 |
69 | #ifndef APPLY
70 | #define APPLY BK_APPLY
71 | #endif
72 |
73 | #ifndef MAP
74 | #define MAP BK_MAP
75 | #endif
76 |
77 | #ifndef SELECT
78 | #define SELECT BK_SELECT
79 | #endif
80 |
81 | #ifndef REJECT
82 | #define REJECT BK_REJECT
83 | #endif
84 |
85 | #ifndef MATCH
86 | #define MATCH BK_MATCH
87 | #endif
88 |
89 | #ifndef REDUCE
90 | #define REDUCE BK_REDUCE
91 | #endif
92 |
93 | #ifndef NEXT
94 | #define NEXT BK_NEXT
95 | #endif
96 |
97 | #endif
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSDictionary+BlocksKit.h"
7 |
8 | @implementation NSDictionary (BlocksKit)
9 |
10 | - (void)bk_each:(void (^)(id key, id obj))block
11 | {
12 | NSParameterAssert(block != nil);
13 |
14 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
15 | block(key, obj);
16 | }];
17 | }
18 |
19 | - (void)bk_apply:(void (^)(id key, id obj))block
20 | {
21 | NSParameterAssert(block != nil);
22 |
23 | [self enumerateKeysAndObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id key, id obj, BOOL *stop) {
24 | block(key, obj);
25 | }];
26 | }
27 |
28 | - (id)bk_match:(BOOL (^)(id key, id obj))block
29 | {
30 | NSParameterAssert(block != nil);
31 |
32 | return self[[[self keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) {
33 | if (block(key, obj)) {
34 | *stop = YES;
35 | return YES;
36 | }
37 |
38 | return NO;
39 | }] anyObject]];
40 | }
41 |
42 | - (NSDictionary *)bk_select:(BOOL (^)(id key, id obj))block
43 | {
44 | NSParameterAssert(block != nil);
45 |
46 | NSArray *keys = [[self keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) {
47 | return block(key, obj);
48 | }] allObjects];
49 |
50 | NSArray *objects = [self objectsForKeys:keys notFoundMarker:[NSNull null]];
51 | return [NSDictionary dictionaryWithObjects:objects forKeys:keys];
52 | }
53 |
54 | - (NSDictionary *)bk_reject:(BOOL (^)(id key, id obj))block
55 | {
56 | NSParameterAssert(block != nil);
57 | return [self bk_select:^BOOL(id key, id obj) {
58 | return !block(key, obj);
59 | }];
60 | }
61 |
62 | - (NSDictionary *)bk_map:(id (^)(id key, id obj))block
63 | {
64 | NSParameterAssert(block != nil);
65 |
66 | NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:self.count];
67 |
68 | [self bk_each:^(id key, id obj) {
69 | id value = block(key, obj) ?: [NSNull null];
70 | result[key] = value;
71 | }];
72 |
73 | return result;
74 | }
75 |
76 | - (BOOL)bk_any:(BOOL (^)(id key, id obj))block
77 | {
78 | return [self bk_match:block] != nil;
79 | }
80 |
81 | - (BOOL)bk_none:(BOOL (^)(id key, id obj))block
82 | {
83 | return [self bk_match:block] == nil;
84 | }
85 |
86 | - (BOOL)bk_all:(BOOL (^)(id key, id obj))block
87 | {
88 | NSParameterAssert(block != nil);
89 |
90 | __block BOOL result = YES;
91 |
92 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
93 | if (!block(key, obj)) {
94 | result = NO;
95 | *stop = YES;
96 | }
97 | }];
98 |
99 | return result;
100 | }
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSIndexSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSIndexSet+BlocksKit.h"
7 |
8 | @implementation NSIndexSet (BlocksKit)
9 |
10 | - (void)bk_each:(void (^)(NSUInteger index))block {
11 | NSParameterAssert(block != nil);
12 |
13 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
14 | block(idx);
15 | }];
16 | }
17 |
18 | - (void)bk_apply:(void (^)(NSUInteger index))block {
19 | NSParameterAssert(block != nil);
20 |
21 | [self enumerateIndexesWithOptions:NSEnumerationConcurrent usingBlock:^(NSUInteger idx, BOOL *stop) {
22 | block(idx);
23 | }];
24 | }
25 |
26 | - (NSUInteger)bk_match:(BOOL (^)(NSUInteger index))block {
27 | NSParameterAssert(block != nil);
28 |
29 | return [self indexPassingTest:^BOOL(NSUInteger idx, BOOL *stop) {
30 | return block(idx);
31 | }];
32 | }
33 |
34 | - (NSIndexSet *)bk_select:(BOOL (^)(NSUInteger index))block {
35 | NSParameterAssert(block != nil);
36 |
37 | NSIndexSet *list = [self indexesPassingTest:^BOOL(NSUInteger idx, BOOL *stop) {
38 | return block(idx);
39 | }];
40 |
41 | if (!list.count) return nil;
42 | return list;
43 | }
44 |
45 | - (NSIndexSet *)bk_reject:(BOOL (^)(NSUInteger index))block {
46 | NSParameterAssert(block != nil);
47 | return [self bk_select:^BOOL(NSUInteger idx) {
48 | return !block(idx);
49 | }];
50 | }
51 |
52 | - (NSIndexSet *)bk_map:(NSUInteger (^)(NSUInteger index))block {
53 | NSParameterAssert(block != nil);
54 |
55 | NSMutableIndexSet *list = [NSMutableIndexSet indexSet];
56 |
57 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
58 | [list addIndex:block(idx)];
59 | }];
60 |
61 | if (!list.count) return nil;
62 | return list;
63 | }
64 |
65 | - (NSArray *)bk_mapIndex:(id (^)(NSUInteger index))block {
66 | NSParameterAssert(block != nil);
67 |
68 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count];
69 |
70 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
71 | id value = block(idx) ?: [NSNull null];
72 | [result addObject:value];
73 | }];
74 |
75 | return result;
76 | }
77 |
78 | - (BOOL)bk_any:(BOOL (^)(NSUInteger index))block {
79 | return [self bk_match:block] != NSNotFound;
80 | }
81 |
82 | - (BOOL)bk_none:(BOOL (^)(NSUInteger index))block {
83 | return [self bk_match:block] == NSNotFound;
84 | }
85 |
86 | - (BOOL)bk_all:(BOOL (^)(NSUInteger index))block {
87 | NSParameterAssert(block != nil);
88 |
89 | __block BOOL result = YES;
90 |
91 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
92 | if (!block(idx)) {
93 | result = NO;
94 | *stop = YES;
95 | }
96 | }];
97 |
98 | return result;
99 | }
100 |
101 | @end
102 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSInvocation+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** BlocksKit extensions for NSInvocation. */
9 | @interface NSInvocation (BlocksKit)
10 |
11 | /** Generates a forwarding `NSInvocation` instance for a given method call
12 | encapsulated by the given block.
13 |
14 | NSInvocation *invocation = [NSInvocation invocationWithTarget:target block:^(id myObject) {
15 | [myObject someMethodWithArg:42.0];
16 | }];
17 |
18 | This returns an invocation with the appropriate target, selector, and arguments
19 | without creating the buffers yourself. It is only recommended to call a method
20 | on the argument to the block only once. More complicated forwarding machinery
21 | can be accomplished by the A2DynamicDelegate family of classes included in
22 | BlocksKit.
23 |
24 | Created by [Jonathan Rentzch](https://github.com/rentzsch) as
25 | `NSInvocation-blocks`.
26 |
27 | @param target The object to "grab" the block invocation from.
28 | @param block A code block.
29 | @return A fully-prepared instance of NSInvocation ready to be invoked.
30 | */
31 | + (NSInvocation *)bk_invocationWithTarget:(id)target block:(void (^)(id target))block;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSInvocation+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSInvocation+BlocksKit.h"
7 |
8 | @interface BKInvocationGrabber : NSProxy
9 |
10 | + (BKInvocationGrabber *)grabberWithTarget:(id)target;
11 |
12 | @property (nonatomic, strong) id target;
13 | @property (nonatomic, strong) NSInvocation *invocation;
14 |
15 | @end
16 |
17 | @implementation BKInvocationGrabber
18 |
19 | + (BKInvocationGrabber *)grabberWithTarget:(id)target {
20 | BKInvocationGrabber *instance = [BKInvocationGrabber alloc];
21 | instance.target = target;
22 | return instance;
23 | }
24 |
25 | - (NSMethodSignature*)methodSignatureForSelector:(SEL)selector {
26 | return [self.target methodSignatureForSelector:selector];
27 | }
28 |
29 | - (void)forwardInvocation:(NSInvocation*)invocation {
30 | [invocation setTarget:self.target];
31 | NSParameterAssert(self.invocation == nil);
32 | self.invocation = invocation;
33 | }
34 |
35 | @end
36 |
37 |
38 | @implementation NSInvocation (BlocksKit)
39 |
40 | + (NSInvocation *)bk_invocationWithTarget:(id)target block:(void (^)(id target))block
41 | {
42 | NSParameterAssert(block != nil);
43 | BKInvocationGrabber *grabber = [BKInvocationGrabber grabberWithTarget:target];
44 | block(grabber);
45 | return grabber.invocation;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableArray+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block extensions for NSMutableArray.
9 |
10 | These utilities expound upon the BlocksKit additions to the immutable
11 | superclass by allowing certain utilities to work on an instance of the mutable
12 | class, saving memory by not creating an immutable copy of the results.
13 |
14 | Includes code by the following:
15 |
16 | - [Martin Schürrer](https://github.com/MSch)
17 | - [Zach Waldowski](https://github.com/zwaldowski)
18 |
19 | @see NSArray(BlocksKit)
20 | */
21 | @interface NSMutableArray (BlocksKit)
22 |
23 | /** Filters a mutable array to the objects matching the block.
24 |
25 | @param block A single-argument, BOOL-returning code block.
26 | @see bk_reject:
27 | */
28 | - (void)bk_performSelect:(BOOL (^)(id obj))block;
29 |
30 | /** Filters a mutable array to all objects but the ones matching the block,
31 | the logical inverse to bk_select:.
32 |
33 | @param block A single-argument, BOOL-returning code block.
34 | @see bk_select:
35 | */
36 | - (void)bk_performReject:(BOOL (^)(id obj))block;
37 |
38 | /** Transform the objects in the array to the results of the block.
39 |
40 | This is sometimes referred to as a transform, mutating one of each object:
41 | [foo bk_performMap:^id(id obj) {
42 | return [dateTransformer dateFromString:obj];
43 | }];
44 |
45 | @param block A single-argument, object-returning code block.
46 | @see bk_map:
47 | */
48 | - (void)bk_performMap:(id (^)(id obj))block;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableArray+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSMutableArray+BlocksKit.h"
7 |
8 | @implementation NSMutableArray (BlocksKit)
9 |
10 | - (void)bk_performSelect:(BOOL (^)(id obj))block {
11 | NSParameterAssert(block != nil);
12 |
13 | NSIndexSet *list = [self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
14 | return !block(obj);
15 | }];
16 |
17 | if (!list.count) return;
18 | [self removeObjectsAtIndexes:list];
19 | }
20 |
21 | - (void)bk_performReject:(BOOL (^)(id obj))block {
22 | NSParameterAssert(block != nil);
23 | return [self bk_performSelect:^BOOL(id obj) {
24 | return !block(obj);
25 | }];
26 | }
27 |
28 | - (void)bk_performMap:(id (^)(id obj))block {
29 | NSParameterAssert(block != nil);
30 |
31 | NSMutableArray *new = [self mutableCopy];
32 |
33 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
34 | id value = block(obj) ?: [NSNull null];
35 | if ([value isEqual:obj]) return;
36 | new[idx] = value;
37 | }];
38 |
39 | [self setArray:new];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableDictionary+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block extensions for NSMutableDictionary.
9 |
10 | These utilities expound upon the BlocksKit additions to the immutable
11 | superclass by allowing certain utilities to work on an instance of the mutable
12 | class, saving memory by not creating an immutable copy of the results.
13 |
14 | Includes code by the following:
15 |
16 | - [Martin Schürrer](https://github.com/MSch)
17 | - [Zach Waldowski](https://github.com/zwaldowski)
18 |
19 | @see NSDictionary(BlocksKit)
20 | */
21 | @interface NSMutableDictionary (BlocksKit)
22 |
23 | /** Filters a mutable dictionary to the key/value pairs matching the block.
24 |
25 | @param block A BOOL-returning code block for a key/value pair.
26 | @see bk_reject:
27 | */
28 | - (void)bk_performSelect:(BOOL (^)(id key, id obj))block;
29 |
30 | /** Filters a mutable dictionary to the key/value pairs not matching the block,
31 | the logical inverse to bk_select:.
32 |
33 | @param block A BOOL-returning code block for a key/value pair.
34 | @see bk_select:
35 | */
36 | - (void)bk_performReject:(BOOL (^)(id key, id obj))block;
37 |
38 | /** Transform each value of the dictionary to a new value, as returned by the
39 | block.
40 |
41 | @param block A block that returns a new value for a given key/value pair.
42 | @see bk_map:
43 | */
44 | - (void)bk_performMap:(id (^)(id key, id obj))block;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableDictionary+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSMutableDictionary+BlocksKit.h"
7 |
8 | @implementation NSMutableDictionary (BlocksKit)
9 |
10 | - (void)bk_performSelect:(BOOL (^)(id key, id obj))block
11 | {
12 | NSParameterAssert(block != nil);
13 |
14 | NSArray *keys = [[self keysOfEntriesWithOptions:NSEnumerationConcurrent passingTest:^BOOL(id key, id obj, BOOL *stop) {
15 | return !block(key, obj);
16 | }] allObjects];
17 |
18 | [self removeObjectsForKeys:keys];
19 | }
20 |
21 | - (void)bk_performReject:(BOOL (^)(id key, id obj))block
22 | {
23 | NSParameterAssert(block != nil);
24 | [self bk_performSelect:^BOOL(id key, id obj) {
25 | return !block(key, obj);
26 | }];
27 | }
28 |
29 | - (void)bk_performMap:(id (^)(id key, id obj))block
30 | {
31 | NSParameterAssert(block != nil);
32 |
33 | NSMutableDictionary *new = [self mutableCopy];
34 |
35 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
36 | id value = block(key, obj) ?: [NSNull null];
37 | if ([value isEqual:obj]) return;
38 | new[key] = value;
39 | }];
40 |
41 | [self setDictionary:new];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableIndexSet+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block extensions for NSMutableIndexSet.
9 |
10 | These utilities expound upon the BlocksKit additions to the immutable
11 | superclass by allowing certain utilities to work on an instance of the mutable
12 | class, saving memory by not creating an immutable copy of the results.
13 |
14 | @see NSIndexSet(BlocksKit)
15 | */
16 | @interface NSMutableIndexSet (BlocksKit)
17 |
18 | /** Filters a mutable index set to the indexes matching the block.
19 |
20 | @param block A single-argument, BOOL-returning code block.
21 | @see bk_reject:
22 | */
23 | - (void)bk_performSelect:(BOOL (^)(NSUInteger index))block;
24 |
25 | /** Filters a mutable index set to all indexes but the ones matching the block,
26 | the logical inverse to bk_select:.
27 |
28 | @param block A single-argument, BOOL-returning code block.
29 | @see bk_select:
30 | */
31 | - (void)bk_performReject:(BOOL (^)(NSUInteger index))block;
32 |
33 | /** Transform each index of the index set to a new index, as returned by the
34 | block.
35 |
36 | @param block A block that returns a new index for a index.
37 | @see bk_map:
38 | */
39 | - (void)bk_performMap:(NSUInteger (^)(NSUInteger index))block;
40 |
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableIndexSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSMutableIndexSet+BlocksKit.h"
7 |
8 | @implementation NSMutableIndexSet (BlocksKit)
9 |
10 | - (void)bk_performSelect:(BOOL (^)(NSUInteger index))block
11 | {
12 | NSParameterAssert(block != nil);
13 |
14 | NSIndexSet *list = [self indexesPassingTest:^BOOL(NSUInteger idx, BOOL *stop) {
15 | return !block(idx);
16 | }];
17 |
18 | if (!list.count) return;
19 | [self removeIndexes:list];
20 | }
21 |
22 | - (void)bk_performReject:(BOOL (^)(NSUInteger index))block
23 | {
24 | NSParameterAssert(block != nil);
25 | return [self bk_performSelect:^BOOL(NSUInteger idx) {
26 | return !block(idx);
27 | }];
28 | }
29 |
30 | - (void)bk_performMap:(NSUInteger (^)(NSUInteger index))block
31 | {
32 | NSParameterAssert(block != nil);
33 |
34 | NSMutableIndexSet *new = [self mutableCopy];
35 |
36 | [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
37 | [new addIndex:block(idx)];
38 | }];
39 |
40 | [self removeAllIndexes];
41 | [self addIndexes:new];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableOrderedSet+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block extensions for NSMutableOrderedSet.
9 |
10 | These utilities expound upon the BlocksKit additions to the immutable
11 | superclass by allowing certain utilities to work on an instance of the mutable
12 | class, saving memory by not creating an immutable copy of the results.
13 |
14 | Includes code by the following:
15 |
16 | - [Martin Schürrer](https://github.com/MSch)
17 | - [Zach Waldowski](https://github.com/zwaldowski)
18 |
19 | @see NSOrderedSet(BlocksKit)
20 | */
21 | @interface NSMutableOrderedSet (BlocksKit)
22 |
23 | /** Filters a mutable ordered set to the objects matching the block.
24 |
25 | @param block A single-argument, BOOL-returning code block.
26 | @see bk_reject:
27 | */
28 | - (void)bk_performSelect:(BOOL (^)(id obj))block;
29 |
30 | /** Filters a mutable ordered set to all objects but the ones matching the
31 | block, the logical inverse to bk_select:.
32 |
33 | @param block A single-argument, BOOL-returning code block.
34 | @see bk_select:
35 | */
36 | - (void)bk_performReject:(BOOL (^)(id obj))block;
37 |
38 | /** Transform the objects in the ordered set to the results of the block.
39 |
40 | This is sometimes referred to as a transform, mutating one of each object:
41 | [foo bk_performMap:^id(id obj) {
42 | return [dateTransformer dateFromString:obj];
43 | }];
44 |
45 | @param block A single-argument, object-returning code block.
46 | @see bk_map:
47 | */
48 | - (void)bk_performMap:(id (^)(id obj))block;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableOrderedSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSMutableOrderedSet+BlocksKit.h"
7 |
8 | @implementation NSMutableOrderedSet (BlocksKit)
9 |
10 | - (void)bk_performSelect:(BOOL (^)(id obj))block {
11 | NSParameterAssert(block != nil);
12 |
13 | NSIndexSet *list = [self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
14 | return !block(obj);
15 | }];
16 |
17 | if (!list.count) return;
18 | [self removeObjectsAtIndexes:list];
19 | }
20 |
21 | - (void)bk_performReject:(BOOL (^)(id obj))block {
22 | NSParameterAssert(block != nil);
23 | return [self bk_performSelect:^BOOL(id obj) {
24 | return !block(obj);
25 | }];
26 | }
27 |
28 | - (void)bk_performMap:(id (^)(id obj))block {
29 | NSParameterAssert(block != nil);
30 |
31 | NSMutableIndexSet *newIndexes = [NSMutableIndexSet indexSet];
32 | NSMutableArray *newObjects = [NSMutableArray arrayWithCapacity:self.count];
33 |
34 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
35 | id value = block(obj) ?: [NSNull null];
36 | if ([value isEqual:obj]) return;
37 | [newIndexes addIndex:idx];
38 | [newObjects addObject:obj];
39 | }];
40 |
41 | [self replaceObjectsAtIndexes:newIndexes withObjects:newObjects];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableSet+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block extensions for NSMutableSet.
9 |
10 | These utilities expound upon the BlocksKit additions to the immutable
11 | superclass by allowing certain utilities to work on an instance of the mutable
12 | class, saving memory by not creating an immutable copy of the results.
13 |
14 | Includes code by the following:
15 |
16 | - [Martin Schürrer](https://github.com/MSch)
17 | - [Zach Waldowski](https://github.com/zwaldowski)
18 |
19 | @see NSSet(BlocksKit)
20 | */
21 | @interface NSMutableSet (BlocksKit)
22 |
23 | /** Filters a mutable set to the objects matching the block.
24 |
25 | @param block A single-argument, BOOL-returning code block.
26 | @see bk_reject:
27 | */
28 | - (void)bk_performSelect:(BOOL (^)(id obj))block;
29 |
30 | /** Filters a mutable set to all objects but the ones matching the block,
31 | the logical inverse to bk_select:.
32 |
33 | @param block A single-argument, BOOL-returning code block.
34 | @see bk_select:
35 | */
36 | - (void)bk_performReject:(BOOL (^)(id obj))block;
37 |
38 | /** Transform the objects in the set to the results of the block.
39 |
40 | This is sometimes referred to as a transform, mutating one of each object:
41 | [controllers bk_map:^id(id obj) {
42 | return [obj view];
43 | }];
44 |
45 | @param block A single-argument, object-returning code block.
46 | @see bk_map:
47 | */
48 | - (void)bk_performMap:(id (^)(id obj))block;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSMutableSet+BlocksKit.h"
7 |
8 | @implementation NSMutableSet (BlocksKit)
9 |
10 | - (void)bk_performSelect:(BOOL (^)(id obj))block {
11 | NSParameterAssert(block != nil);
12 |
13 | NSSet *list = [self objectsPassingTest:^BOOL(id obj, BOOL *stop) {
14 | return block(obj);
15 | }];
16 |
17 | [self setSet:list];
18 | }
19 |
20 | - (void)bk_performReject:(BOOL (^)(id obj))block {
21 | NSParameterAssert(block != nil);
22 | [self bk_performSelect:^BOOL(id obj) {
23 | return !block(obj);
24 | }];
25 | }
26 |
27 | - (void)bk_performMap:(id (^)(id obj))block {
28 | NSParameterAssert(block != nil);
29 |
30 | NSMutableSet *new = [NSMutableSet setWithCapacity:self.count];
31 |
32 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) {
33 | id value = block(obj);
34 | if (!value) return;
35 | [new addObject:value];
36 | }];
37 |
38 | [self setSet:new];
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+BKAssociatedObjects.m
3 | // BlocksKit
4 | //
5 |
6 | #import
7 | #import "NSObject+BKAssociatedObjects.h"
8 |
9 | #pragma mark - Weak support
10 |
11 | @interface _BKWeakAssociatedObject : NSObject
12 |
13 | @property (nonatomic, weak) id value;
14 |
15 | @end
16 |
17 | @implementation _BKWeakAssociatedObject
18 |
19 | @end
20 |
21 | @implementation NSObject (BKAssociatedObjects)
22 |
23 | #pragma mark - Instance Methods
24 |
25 | - (void)bk_associateValue:(id)value withKey:(const void *)key
26 | {
27 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
28 | }
29 |
30 | - (void)bk_atomicallyAssociateValue:(id)value withKey:(const void *)key
31 | {
32 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN);
33 | }
34 |
35 | - (void)bk_associateCopyOfValue:(id)value withKey:(const void *)key
36 | {
37 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC);
38 | }
39 |
40 | - (void)bk_atomicallyAssociateCopyOfValue:(id)value withKey:(const void *)key
41 | {
42 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY);
43 | }
44 |
45 | - (void)bk_weaklyAssociateValue:(__autoreleasing id)value withKey:(const void *)key
46 | {
47 | _BKWeakAssociatedObject *assoc = objc_getAssociatedObject(self, key);
48 | if (!assoc) {
49 | assoc = [_BKWeakAssociatedObject new];
50 | [self bk_associateValue:assoc withKey:key];
51 | }
52 | assoc.value = value;
53 | }
54 |
55 | - (id)bk_associatedValueForKey:(const void *)key
56 | {
57 | id value = objc_getAssociatedObject(self, key);
58 | if (value && [value isKindOfClass:[_BKWeakAssociatedObject class]]) {
59 | return [(_BKWeakAssociatedObject *)value value];
60 | }
61 | return value;
62 | }
63 |
64 | - (void)bk_removeAllAssociatedObjects
65 | {
66 | objc_removeAssociatedObjects(self);
67 | }
68 |
69 | #pragma mark - Class Methods
70 |
71 | + (void)bk_associateValue:(id)value withKey:(const void *)key
72 | {
73 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
74 | }
75 |
76 | + (void)bk_atomicallyAssociateValue:(id)value withKey:(const void *)key
77 | {
78 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_RETAIN);
79 | }
80 |
81 | + (void)bk_associateCopyOfValue:(id)value withKey:(const void *)key
82 | {
83 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC);
84 | }
85 |
86 | + (void)bk_atomicallyAssociateCopyOfValue:(id)value withKey:(const void *)key
87 | {
88 | objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY);
89 | }
90 |
91 | + (void)bk_weaklyAssociateValue:(__autoreleasing id)value withKey:(const void *)key
92 | {
93 | _BKWeakAssociatedObject *assoc = objc_getAssociatedObject(self, key);
94 | if (!assoc) {
95 | assoc = [_BKWeakAssociatedObject new];
96 | [self bk_associateValue:assoc withKey:key];
97 | }
98 | assoc.value = value;
99 | }
100 |
101 | + (id)bk_associatedValueForKey:(const void *)key
102 | {
103 | id value = objc_getAssociatedObject(self, key);
104 | if (value && [value isKindOfClass:[_BKWeakAssociatedObject class]]) {
105 | return [(_BKWeakAssociatedObject *)value value];
106 | }
107 | return value;
108 | }
109 |
110 | + (void)bk_removeAllAssociatedObjects
111 | {
112 | objc_removeAssociatedObjects(self);
113 | }
114 |
115 | @end
116 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+BKBlockExecution.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSObject+BKBlockExecution.h"
7 |
8 | #define BKTimeDelay(t) dispatch_time(DISPATCH_TIME_NOW, (uint64_t)(NSEC_PER_SEC * t))
9 |
10 | @implementation NSObject (BlocksKit)
11 |
12 | - (id)bk_performBlock:(void (^)(id obj))block afterDelay:(NSTimeInterval)delay
13 | {
14 | return [self bk_performBlock:block onQueue:dispatch_get_main_queue() afterDelay:delay];
15 | }
16 |
17 | + (id)bk_performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay
18 | {
19 | return [NSObject bk_performBlock:block onQueue:dispatch_get_main_queue() afterDelay:delay];
20 | }
21 |
22 | - (id)bk_performBlockInBackground:(void (^)(id obj))block afterDelay:(NSTimeInterval)delay
23 | {
24 | return [self bk_performBlock:block onQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) afterDelay:delay];
25 | }
26 |
27 | + (id)bk_performBlockInBackground:(void (^)(void))block afterDelay:(NSTimeInterval)delay
28 | {
29 | return [NSObject bk_performBlock:block onQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) afterDelay:delay];
30 | }
31 |
32 | - (id)bk_performBlock:(void (^)(id obj))block onQueue:(dispatch_queue_t)queue afterDelay:(NSTimeInterval)delay
33 | {
34 | NSParameterAssert(block != nil);
35 |
36 | __block BOOL cancelled = NO;
37 |
38 | void (^wrapper)(BOOL) = ^(BOOL cancel) {
39 | if (cancel) {
40 | cancelled = YES;
41 | return;
42 | }
43 | if (!cancelled) block(self);
44 | };
45 |
46 | dispatch_after(BKTimeDelay(delay), queue, ^{
47 | wrapper(NO);
48 | });
49 |
50 | return [wrapper copy];
51 | }
52 |
53 | + (id)bk_performBlock:(void (^)(void))block onQueue:(dispatch_queue_t)queue afterDelay:(NSTimeInterval)delay
54 | {
55 | NSParameterAssert(block != nil);
56 |
57 | __block BOOL cancelled = NO;
58 |
59 | void (^wrapper)(BOOL) = ^(BOOL cancel) {
60 | if (cancel) {
61 | cancelled = YES;
62 | return;
63 | }
64 | if (!cancelled) block();
65 | };
66 |
67 | dispatch_after(BKTimeDelay(delay), queue, ^{ wrapper(NO); });
68 |
69 | return [wrapper copy];
70 | }
71 |
72 | + (void)bk_cancelBlock:(id)block
73 | {
74 | NSParameterAssert(block != nil);
75 | void (^wrapper)(BOOL) = block;
76 | wrapper(YES);
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSOrderedSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSOrderedSet+BlocksKit.h"
7 |
8 | @implementation NSOrderedSet (BlocksKit)
9 |
10 | - (void)bk_each:(void (^)(id obj))block
11 | {
12 | NSParameterAssert(block != nil);
13 |
14 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
15 | block(obj);
16 | }];
17 | }
18 |
19 | - (void)bk_apply:(void (^)(id obj))block
20 | {
21 | NSParameterAssert(block != nil);
22 |
23 | [self enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
24 | block(obj);
25 | }];
26 | }
27 |
28 | - (id)bk_match:(BOOL (^)(id obj))block
29 | {
30 | NSParameterAssert(block != nil);
31 |
32 | NSUInteger index = [self indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
33 | return block(obj);
34 | }];
35 |
36 | if (index == NSNotFound) return nil;
37 | return self[index];
38 | }
39 |
40 | - (NSOrderedSet *)bk_select:(BOOL (^)(id obj))block
41 | {
42 | NSParameterAssert(block != nil);
43 |
44 | NSArray *objects = [self objectsAtIndexes:[self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
45 | return block(obj);
46 | }]];
47 |
48 | if (!objects.count) return [[self class] orderedSet];
49 | return [[self class] orderedSetWithArray:objects];
50 | }
51 |
52 | - (NSOrderedSet *)bk_reject:(BOOL (^)(id obj))block
53 | {
54 | NSParameterAssert(block != nil);
55 | return [self bk_select:^BOOL(id obj) {
56 | return !block(obj);
57 | }];
58 | }
59 |
60 | - (NSOrderedSet *)bk_map:(id (^)(id obj))block
61 | {
62 | NSParameterAssert(block != nil);
63 |
64 | NSMutableOrderedSet *result = [NSMutableOrderedSet orderedSetWithCapacity:self.count];
65 |
66 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
67 | id value = block(obj) ?: [NSNull null];
68 | [result addObject:value];
69 | }];
70 |
71 | return result;
72 | }
73 |
74 | - (id)bk_reduce:(id)initial withBlock:(id (^)(id sum, id obj))block
75 | {
76 | NSParameterAssert(block != nil);
77 |
78 | __block id result = initial;
79 |
80 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
81 | result = block(result, obj);
82 | }];
83 |
84 | return result;
85 | }
86 |
87 | - (BOOL)bk_any:(BOOL (^)(id obj))block
88 | {
89 | return [self bk_match:block] != nil;
90 | }
91 |
92 | - (BOOL)bk_none:(BOOL (^)(id obj))block
93 | {
94 | return [self bk_match:block] == nil;
95 | }
96 |
97 | - (BOOL)bk_all:(BOOL (^)(id obj))block
98 | {
99 | NSParameterAssert(block != nil);
100 |
101 | __block BOOL result = YES;
102 |
103 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
104 | if (!block(obj)) {
105 | result = NO;
106 | *stop = YES;
107 | }
108 | }];
109 |
110 | return result;
111 | }
112 |
113 | - (BOOL)bk_corresponds:(NSOrderedSet *)list withBlock:(BOOL (^)(id obj1, id obj2))block
114 | {
115 | NSParameterAssert(block != nil);
116 |
117 | __block BOOL result = NO;
118 |
119 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
120 | if (idx < list.count) {
121 | id obj2 = list[idx];
122 | result = block(obj, obj2);
123 | } else {
124 | result = NO;
125 | }
126 | *stop = !result;
127 | }];
128 |
129 | return result;
130 | }
131 |
132 | @end
133 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSSet+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSSet+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSSet+BlocksKit.h"
7 |
8 | @implementation NSSet (BlocksKit)
9 |
10 | - (void)bk_each:(void (^)(id obj))block
11 | {
12 | NSParameterAssert(block != nil);
13 |
14 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) {
15 | block(obj);
16 | }];
17 | }
18 |
19 | - (void)bk_apply:(void (^)(id obj))block
20 | {
21 | NSParameterAssert(block != nil);
22 |
23 | [self enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, BOOL *stop) {
24 | block(obj);
25 | }];
26 | }
27 |
28 | - (id)bk_match:(BOOL (^)(id obj))block
29 | {
30 | NSParameterAssert(block != nil);
31 |
32 | return [[self objectsPassingTest:^BOOL(id obj, BOOL *stop) {
33 | if (block(obj)) {
34 | *stop = YES;
35 | return YES;
36 | }
37 |
38 | return NO;
39 | }] anyObject];
40 | }
41 |
42 | - (NSSet *)bk_select:(BOOL (^)(id obj))block
43 | {
44 | NSParameterAssert(block != nil);
45 |
46 | return [self objectsPassingTest:^BOOL(id obj, BOOL *stop) {
47 | return block(obj);
48 | }];
49 | }
50 |
51 | - (NSSet *)bk_reject:(BOOL (^)(id obj))block
52 | {
53 | NSParameterAssert(block != nil);
54 |
55 | return [self objectsPassingTest:^BOOL(id obj, BOOL *stop) {
56 | return !block(obj);
57 | }];
58 | }
59 |
60 | - (NSSet *)bk_map:(id (^)(id obj))block
61 | {
62 | NSParameterAssert(block != nil);
63 |
64 | NSMutableSet *result = [NSMutableSet setWithCapacity:self.count];
65 |
66 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) {
67 | id value = block(obj) ?:[NSNull null];
68 | [result addObject:value];
69 | }];
70 |
71 | return result;
72 | }
73 |
74 | - (id)bk_reduce:(id)initial withBlock:(id (^)(id sum, id obj))block
75 | {
76 | NSParameterAssert(block != nil);
77 |
78 | __block id result = initial;
79 |
80 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) {
81 | result = block(result, obj);
82 | }];
83 |
84 | return result;
85 | }
86 |
87 | - (BOOL)bk_any:(BOOL (^)(id obj))block
88 | {
89 | return [self bk_match:block] != nil;
90 | }
91 |
92 | - (BOOL)bk_none:(BOOL (^)(id obj))block
93 | {
94 | return [self bk_match:block] == nil;
95 | }
96 |
97 | - (BOOL)bk_all:(BOOL (^)(id obj))block
98 | {
99 | NSParameterAssert(block != nil);
100 |
101 | __block BOOL result = YES;
102 |
103 | [self enumerateObjectsUsingBlock:^(id obj, BOOL *stop) {
104 | if (!block(obj)) {
105 | result = NO;
106 | *stop = YES;
107 | }
108 | }];
109 |
110 | return result;
111 | }
112 |
113 | @end
114 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Simple category on NSTimer to give it blocks capability.
9 |
10 | Created by [Jiva DeVoe](https://github.com/jivadevoe) as `NSTimer-Blocks`.
11 | */
12 | @interface NSTimer (BlocksKit)
13 |
14 | /** Creates and returns a block-based NSTimer object and schedules it on the current run loop.
15 |
16 | @param inTimeInterval The number of seconds between firings of the timer.
17 | @param inBlock The block that the NSTimer fires.
18 | @param inRepeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires.
19 | @return A new NSTimer object, configured according to the specified parameters.
20 | */
21 | + (NSTimer *)bk_scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))inBlock repeats:(BOOL)inRepeats;
22 |
23 | /** Creates and returns a block-based NSTimer initialized with the specified block.
24 |
25 | You must add the new timer to a run loop, using `-addTimer:forMode:`. Then,
26 | after seconds seconds have elapsed, the timer fires the block. If the timer
27 | is configured to repeat, there is no need to subsequently re-add the timer.
28 |
29 | @param inTimeInterval The number of seconds between firings of the timer.
30 | @param inBlock The block that the NSTimer fires.
31 | @param inRepeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires.
32 | @return A new NSTimer object, configured according to the specified parameters.
33 | */
34 | + (NSTimer *)bk_timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))inBlock repeats:(BOOL)inRepeats;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSTimer+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "NSTimer+BlocksKit.h"
7 |
8 | @interface NSTimer (BlocksKitPrivate)
9 |
10 | + (void)bk_executeBlockFromTimer:(NSTimer *)aTimer;
11 |
12 | @end
13 |
14 | @implementation NSTimer (BlocksKit)
15 |
16 | + (id)bk_scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))block repeats:(BOOL)inRepeats
17 | {
18 | NSParameterAssert(block != nil);
19 | return [self scheduledTimerWithTimeInterval:inTimeInterval target:self selector:@selector(bk_executeBlockFromTimer:) userInfo:[block copy] repeats:inRepeats];
20 | }
21 |
22 | + (id)bk_timerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)(NSTimer *timer))block repeats:(BOOL)inRepeats
23 | {
24 | NSParameterAssert(block != nil);
25 | return [self timerWithTimeInterval:inTimeInterval target:self selector:@selector(bk_executeBlockFromTimer:) userInfo:[block copy] repeats:inRepeats];
26 | }
27 |
28 | + (void)bk_executeBlockFromTimer:(NSTimer *)aTimer {
29 | void (^block)(NSTimer *) = [aTimer userInfo];
30 | if (block) block(aTimer);
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSCache+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** NSCache with block adding of objects
9 |
10 | This category allows you to conditionally add objects to
11 | an instance of NSCache using blocks. Both the normal
12 | delegation pattern and a block callback for NSCache's one
13 | delegate method are allowed.
14 |
15 | These methods emulate Rails caching behavior.
16 |
17 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to BlocksKit.
18 | */
19 |
20 | @interface NSCache (BlocksKit)
21 |
22 | /** Returns the value associated with a given key. If there is no
23 | object for that key, it uses the result of the block, saves
24 | that to the cache, and returns it.
25 |
26 | This mimics the cache behavior of Ruby on Rails. The following code:
27 |
28 | @products = Rails.cache.fetch('products') do
29 | Product.all
30 | end
31 |
32 | becomes:
33 |
34 | NSMutableArray *products = [cache objectForKey:@"products" withGetter:^id{
35 | return [Product all];
36 | }];
37 |
38 | @return The value associated with *key*, or the object returned
39 | by the block if no value is associated with *key*.
40 | @param key An object identifying the value.
41 | @param getterBlock A block used to get an object if there is no
42 | value in the cache.
43 | */
44 | - (id)bk_objectForKey:(id)key withGetter:(id (^)(void))getterBlock;
45 |
46 | /** Called when an object is about to be evicted from the cache.
47 |
48 | This block callback is an analog for the cache:willEviceObject:
49 | method of NSCacheDelegate.
50 | */
51 | @property (nonatomic, copy, setter = bk_setWillEvictBlock:) void (^bk_willEvictBlock)(NSCache *cache, id obj);
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSCache+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "NSCache+BlocksKit.h"
8 | #import "NSObject+A2BlockDelegate.h"
9 |
10 | #pragma mark Custom delegate
11 |
12 | @interface A2DynamicNSCacheDelegate : A2DynamicDelegate
13 |
14 | @end
15 |
16 | @implementation A2DynamicNSCacheDelegate
17 |
18 | - (void)cache:(NSCache *)cache willEvictObject:(id)obj
19 | {
20 | id realDelegate = self.realDelegate;
21 | if (realDelegate && [realDelegate respondsToSelector:@selector(cache:willEvictObject:)])
22 | [realDelegate cache:cache willEvictObject:obj];
23 |
24 | void (^orig)(NSCache *, id) = [self blockImplementationForMethod:_cmd];
25 | if (orig) orig(cache, obj);
26 | }
27 |
28 | @end
29 |
30 | #pragma mark Category
31 |
32 | @implementation NSCache (BlocksKit)
33 |
34 | @dynamic bk_willEvictBlock;
35 |
36 | + (void)load
37 | {
38 | @autoreleasepool {
39 | [self bk_registerDynamicDelegate];
40 | [self bk_linkDelegateMethods:@{ @"bk_willEvictBlock": @"cache:willEvictObject:" }];
41 | }
42 | }
43 |
44 | #pragma mark Methods
45 |
46 | - (id)bk_objectForKey:(id)key withGetter:(id (^)(void))block
47 | {
48 | id object = [self objectForKey:key];
49 | if (object) return object;
50 |
51 | if (block) {
52 | object = block();
53 | [self setObject:object forKey:key];
54 | }
55 |
56 | return object;
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+A2DynamicDelegate.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 | #import
8 |
9 | /** The A2DynamicDelegate category to NSObject provides the primary interface
10 | by which dynamic delegates are generated for a given object. */
11 | @interface NSObject (A2DynamicDelegate)
12 |
13 | /** Creates or gets a dynamic data source for the reciever.
14 |
15 | A2DynamicDelegate assumes a protocol name `FooBarDataSource`
16 | for instances of class `FooBar`. The object is given a strong
17 | attachment to the reciever, and is automatically deallocated
18 | when the reciever is released.
19 |
20 | If the user implements a `A2DynamicFooBarDataSource` subclass
21 | of A2DynamicDelegate, its implementation of any method
22 | will be used over the block. If the block needs to be used,
23 | it can be called from within the custom
24 | implementation using blockImplementationForMethod:.
25 |
26 | @see blockImplementationForMethod:
27 | @return A dynamic data source.
28 | */
29 | - (id)bk_dynamicDataSource;
30 |
31 | /** Creates or gets a dynamic delegate for the reciever.
32 |
33 | A2DynamicDelegate assumes a protocol name `FooBarDelegate`
34 | for instances of class `FooBar`. The object is given a strong
35 | attachment to the reciever, and is automatically deallocated
36 | when the reciever is released.
37 |
38 | If the user implements a `A2DynamicFooBarDelegate` subclass
39 | of A2DynamicDelegate, its implementation of any method
40 | will be used over the block. If the block needs to be used,
41 | it can be called from within the custom
42 | implementation using blockImplementationForMethod:.
43 |
44 | @see blockImplementationForMethod:
45 | @return A dynamic delegate.
46 | */
47 | - (id)bk_dynamicDelegate;
48 |
49 | /** Creates or gets a dynamic protocol implementation for
50 | the reciever. The designated initializer.
51 |
52 | The object is given a strong attachment to the reciever,
53 | and is automatically deallocated when the reciever is released.
54 |
55 | If the user implements a subclass of A2DynamicDelegate prepended
56 | with `A2Dynamic`, such as `A2DynamicFooProvider`, its
57 | implementation of any method will be used over the block.
58 | If the block needs to be used, it can be called from within the
59 | custom implementation using blockImplementationForMethod:.
60 |
61 | @param protocol A custom protocol.
62 | @return A dynamic protocol implementation.
63 | @see blockImplementationForMethod:
64 | */
65 | - (id)bk_dynamicDelegateForProtocol:(Protocol *)protocol;
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+A2DynamicDelegate.m
3 | // BlocksKit
4 | //
5 |
6 | #import
7 | #import "NSObject+A2DynamicDelegate.h"
8 |
9 | extern Protocol *a2_dataSourceProtocol(Class cls);
10 | extern Protocol *a2_delegateProtocol(Class cls);
11 |
12 | static Class a2_dynamicDelegateClass(Class cls, NSString *suffix)
13 | {
14 | while (cls) {
15 | NSString *className = [NSString stringWithFormat:@"A2Dynamic%@%@", NSStringFromClass(cls), suffix];
16 | Class ddClass = NSClassFromString(className);
17 | if (ddClass) return ddClass;
18 |
19 | cls = class_getSuperclass(cls);
20 | }
21 |
22 | return [A2DynamicDelegate class];
23 | }
24 |
25 | static dispatch_queue_t a2_backgroundQueue(void)
26 | {
27 | static dispatch_once_t onceToken;
28 | static dispatch_queue_t backgroundQueue = nil;
29 | dispatch_once(&onceToken, ^{
30 | backgroundQueue = dispatch_queue_create("BlocksKit.DynamicDelegate.Queue", DISPATCH_QUEUE_SERIAL);
31 | });
32 | return backgroundQueue;
33 | }
34 |
35 | @implementation NSObject (A2DynamicDelegate)
36 |
37 | - (id)bk_dynamicDataSource
38 | {
39 | Protocol *protocol = a2_dataSourceProtocol([self class]);
40 | Class class = a2_dynamicDelegateClass([self class], @"DataSource");
41 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol];
42 | }
43 | - (id)bk_dynamicDelegate
44 | {
45 | Protocol *protocol = a2_delegateProtocol([self class]);
46 | Class class = a2_dynamicDelegateClass([self class], @"Delegate");
47 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol];
48 | }
49 | - (id)bk_dynamicDelegateForProtocol:(Protocol *)protocol
50 | {
51 | Class class = [A2DynamicDelegate class];
52 | NSString *protocolName = NSStringFromProtocol(protocol);
53 | if ([protocolName hasSuffix:@"Delegate"]) {
54 | class = a2_dynamicDelegateClass([self class], @"Delegate");
55 | } else if ([protocolName hasSuffix:@"DataSource"]) {
56 | class = a2_dynamicDelegateClass([self class], @"DataSource");
57 | }
58 |
59 | return [self bk_dynamicDelegateWithClass:class forProtocol:protocol];
60 | }
61 | - (id)bk_dynamicDelegateWithClass:(Class)cls forProtocol:(Protocol *)protocol
62 | {
63 | /**
64 | * Storing the dynamic delegate as an associated object of the delegating
65 | * object not only allows us to later retrieve the delegate, but it also
66 | * creates a strong relationship to the delegate. Since delegates are weak
67 | * references on the part of the delegating object, a dynamic delegate
68 | * would be deallocated immediately after its declaring scope ends.
69 | * Therefore, this strong relationship is required to ensure that the
70 | * delegate's lifetime is at least as long as that of the delegating object.
71 | **/
72 |
73 | __block A2DynamicDelegate *dynamicDelegate;
74 |
75 | dispatch_sync(a2_backgroundQueue(), ^{
76 | dynamicDelegate = objc_getAssociatedObject(self, (__bridge const void *)protocol);
77 |
78 | if (!dynamicDelegate)
79 | {
80 | dynamicDelegate = [[cls alloc] initWithProtocol:protocol];
81 | objc_setAssociatedObject(self, (__bridge const void *)protocol, dynamicDelegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
82 | }
83 | });
84 |
85 | return dynamicDelegate;
86 | }
87 |
88 | @end
89 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // MFMailComposeViewController+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** MFMailComposeViewController with block callbacks.
9 |
10 | If you provide a completion handler to an instance of
11 | MFMailComposeViewController but do not implement a delegate callback for
12 | mailComposeController:didFinishWithResult:error:, the mail compose view
13 | controller will automatically be dismissed if it was launched modally.
14 |
15 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to
16 | BlocksKit.
17 |
18 | @warning MFMailComposeViewController is only available on a platform with MessageUI.
19 | */
20 | @interface MFMailComposeViewController (BlocksKit)
21 |
22 | /** The block fired on the dismissal of the mail composition interface.
23 |
24 | This block callback is an analog for the
25 | mailComposeController:didFinishWithResult:error:method
26 | of MFMailComposeViewControllerDelegate.
27 | */
28 | @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMailComposeViewController *controller, MFMailComposeResult result, NSError *error);
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // MFMailComposeViewController+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "MFMailComposeViewController+BlocksKit.h"
8 | #import "NSObject+A2BlockDelegate.h"
9 |
10 | #pragma mark Custom delegate
11 |
12 | @interface A2DynamicMFMailComposeViewControllerDelegate : A2DynamicDelegate
13 |
14 | @end
15 |
16 | @implementation A2DynamicMFMailComposeViewControllerDelegate
17 |
18 | - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
19 | {
20 | id realDelegate = self.realDelegate;
21 | BOOL shouldDismiss = (realDelegate && [realDelegate respondsToSelector:@selector(mailComposeController:didFinishWithResult:error:)]);
22 | if (shouldDismiss)
23 | [realDelegate mailComposeController:controller didFinishWithResult:result error:error];
24 |
25 | void (^block)(MFMailComposeViewController *, MFMailComposeResult, NSError *) = [self blockImplementationForMethod:_cmd];
26 | if (shouldDismiss) {
27 | if (block) block(controller, result, error);
28 | } else {
29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
30 | __weak typeof(controller) weakController = controller;
31 | [controller dismissViewControllerAnimated:YES completion:^{
32 | typeof(&*weakController) strongController = weakController;
33 | if (block) block(strongController, result, error);
34 | }];
35 | #else
36 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
37 | if ([controller respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) {
38 | __weak typeof(controller) weakController = controller;
39 | [controller dismissViewControllerAnimated:YES completion:^{
40 | typeof(&*weakController) strongController = weakController;
41 | if (block) block(strongController, result, error);
42 | }];
43 | } else {
44 | #endif
45 | [controller dismissModalViewControllerAnimated:YES];
46 | if (block) block(controller, result, error);
47 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
48 | }
49 | #endif
50 | #endif
51 | }
52 | }
53 |
54 | @end
55 |
56 | #pragma mark Category
57 |
58 | @implementation MFMailComposeViewController (BlocksKit)
59 |
60 | @dynamic bk_completionBlock;
61 |
62 | + (void)load
63 | {
64 | @autoreleasepool {
65 | [self bk_registerDynamicDelegateNamed:@"mailComposeDelegate"];
66 | [self bk_linkDelegateMethods:@{ @"bk_completionBlock": @"mailComposeController:didFinishWithResult:error:" }];
67 | }
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // MFMessageComposeViewController+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** MFMessageComposeViewController with block callback in addition to delegation.
9 |
10 | If you provide a completion handler to an instance of
11 | MFMessageComposeViewController but do not implement a delegate callback for
12 | messageComposeViewController:didFinishWithResult:error:, the message compose
13 | view controller will automatically be dismissed if it was launched modally.
14 |
15 | Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to
16 | BlocksKit.
17 |
18 | @warning MFMessageComposeViewController is only available on a platform with MessageUI.
19 | */
20 | @interface MFMessageComposeViewController (BlocksKit)
21 |
22 | /** The block fired on the dismissal of the SMS composition interface.
23 |
24 | This block callback is an analog for the
25 | messageComposeViewController:didFinishWithResult: method
26 | of MFMessageComposeViewControllerDelegate.
27 | */
28 | @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMessageComposeViewController *controller, MessageComposeResult result);
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // MFMessageComposeViewController+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "MFMessageComposeViewController+BlocksKit.h"
8 | #import "NSObject+A2BlockDelegate.h"
9 |
10 | #pragma mark Custom delegate
11 |
12 | @interface A2DynamicMFMessageComposeViewControllerDelegate : A2DynamicDelegate
13 |
14 | @end
15 |
16 | @implementation A2DynamicMFMessageComposeViewControllerDelegate
17 |
18 | - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
19 | {
20 | id realDelegate = self.realDelegate;
21 | BOOL shouldDismiss = (realDelegate && [realDelegate respondsToSelector:@selector(messageComposeViewController:didFinishWithResult:)]);
22 | if (shouldDismiss)
23 | [realDelegate messageComposeViewController:controller didFinishWithResult:result];
24 |
25 | void (^block)(MFMessageComposeViewController *, MessageComposeResult) = [self blockImplementationForMethod:_cmd];
26 | if (shouldDismiss) {
27 | if (block) block(controller, result);
28 | } else {
29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
30 | __weak typeof(controller) weakController = controller;
31 | [controller dismissViewControllerAnimated:YES completion:^{
32 | typeof(&*weakController) strongController = weakController;
33 | if (block) block(strongController, result);
34 | }];
35 | #else
36 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
37 | if ([controller respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) {
38 | __weak typeof(controller) weakController = controller;
39 | [controller dismissViewControllerAnimated:YES completion:^{
40 | typeof(&*weakController) strongController = weakController;
41 | if (block) block(strongController, result);
42 | }];
43 | } else {
44 | #endif
45 | [controller dismissModalViewControllerAnimated:YES];
46 | if (block) block(controller, result);
47 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
48 | }
49 | #endif
50 | #endif
51 | }
52 | }
53 |
54 | @end
55 |
56 | #pragma mark - Category
57 |
58 | @implementation MFMessageComposeViewController (BlocksKit)
59 |
60 | @dynamic bk_completionBlock;
61 |
62 | + (void)load
63 | {
64 | @autoreleasepool {
65 | [self bk_registerDynamicDelegateNamed:@"messageComposeDelegate"];
66 | [self bk_linkDelegateMethods:@{ @"bk_completionBlock": @"messageComposeViewController:didFinishWithResult:" }];
67 | }
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block event initialization for UIBarButtonItem.
9 |
10 | This set of extensions has near-drop-in replacements
11 | for the standard set of UIBarButton item initializations,
12 | using a block handler instead of a target/selector.
13 |
14 | Includes code by the following:
15 |
16 | - [Kevin O'Neill](https://github.com/kevinoneill)
17 | - [Zach Waldowski](https://github.com/zwaldowski)
18 |
19 | @warning UIBarButtonItem is only available on a platform with UIKit.
20 | */
21 | @interface UIBarButtonItem (BlocksKit)
22 |
23 | /** Creates and returns a configured item containing the specified system item.
24 |
25 | @return Newly initialized item with the specified properties.
26 | @param systemItem The system item to use as the item representation. One of the constants defined in UIBarButtonSystemItem.
27 | @param action The block that gets fired on the button press.
28 | */
29 | - (id)bk_initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem handler:(void (^)(id sender))action NS_REPLACES_RECEIVER;
30 |
31 | /** Creates and returns a configured item using the specified image and style.
32 |
33 | @return Newly initialized item with the specified properties.
34 | @param image The item’s image. If nil an image is not displayed.
35 | If this image is too large to fit on the bar, it is scaled to fit
36 | The size of a toolbar and navigation bar image is 20 x 20 points.
37 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle.
38 | @param action The block that gets fired on the button press.
39 | */
40 | - (id)bk_initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER;
41 |
42 | /** Creates and returns a configured item using the specified image and style.
43 |
44 | @return Newly initialized item with the specified properties.
45 | @param image The item’s image. If nil an image is not displayed.
46 | @param landscapeImagePhone The image to be used for the item in landscape bars in the UIUserInterfaceIdiomPhone idiom.
47 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle.
48 | @param action The block that gets fired on the button press.
49 | */
50 | - (id)bk_initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER NS_AVAILABLE_IOS(5_0);
51 |
52 | /** Creates and returns a configured item using the specified text and style.
53 |
54 | @return Newly initialized item with the specified properties.
55 | @param title The text displayed on the button item.
56 | @param style The style of the item. One of the constants defined in UIBarButtonItemStyle.
57 | @param action The block that gets fired on the button press.
58 | */
59 | - (id)bk_initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action NS_REPLACES_RECEIVER;
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIBarButtonItem+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import
7 | #import "UIBarButtonItem+BlocksKit.h"
8 |
9 | static const void *BKBarButtonItemBlockKey = &BKBarButtonItemBlockKey;
10 |
11 | @interface UIBarButtonItem (BlocksKitPrivate)
12 |
13 | - (void)bk_handleAction:(UIBarButtonItem *)sender;
14 |
15 | @end
16 |
17 | @implementation UIBarButtonItem (BlocksKit)
18 |
19 | - (id)bk_initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem handler:(void (^)(id sender))action
20 | {
21 | self = [self initWithBarButtonSystemItem:systemItem target:self action:@selector(bk_handleAction:)];
22 | if (!self) return nil;
23 |
24 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC);
25 |
26 | return self;
27 | }
28 |
29 | - (id)bk_initWithImage:(UIImage *)image style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action
30 | {
31 | self = [self initWithImage:image style:style target:self action:@selector(bk_handleAction:)];
32 | if (!self) return nil;
33 |
34 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC);
35 |
36 | return self;
37 | }
38 |
39 | - (id)bk_initWithImage:(UIImage *)image landscapeImagePhone:(UIImage *)landscapeImagePhone style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action
40 | {
41 | self = [self initWithImage:image landscapeImagePhone:landscapeImagePhone style:style target:self action:@selector(bk_handleAction:)];
42 | if (!self) return nil;
43 |
44 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC);
45 |
46 | return self;
47 | }
48 |
49 | - (id)bk_initWithTitle:(NSString *)title style:(UIBarButtonItemStyle)style handler:(void (^)(id sender))action
50 | {
51 | self = [self initWithTitle:title style:style target:self action:@selector(bk_handleAction:)];
52 | if (!self) return nil;
53 |
54 | objc_setAssociatedObject(self, BKBarButtonItemBlockKey, action, OBJC_ASSOCIATION_COPY_NONATOMIC);
55 |
56 | return self;
57 | }
58 |
59 | - (void)bk_handleAction:(UIBarButtonItem *)sender
60 | {
61 | void (^block)(id) = objc_getAssociatedObject(self, BKBarButtonItemBlockKey);
62 | if (block) block(self);
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block control event handling for UIControl.
9 |
10 | Includes code by the following:
11 |
12 | - [Kevin O'Neill](https://github.com/kevinoneill)
13 | - [Zach Waldowski](https://github.com/zwaldowski)
14 |
15 | @warning UIControl is only available on a platform with UIKit.
16 | */
17 | @interface UIControl (BlocksKit)
18 |
19 | ///-----------------------------------
20 | /// @name Block event handling
21 | ///-----------------------------------
22 |
23 | /** Adds a block for a particular event to an internal dispatch table.
24 |
25 | @param handler A block representing an action message, with an argument for the sender.
26 | @param controlEvents A bitmask specifying the control events for which the action message is sent.
27 | @see removeEventHandlersForControlEvents:
28 | */
29 | - (void)bk_addEventHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents;
30 |
31 | /** Removes all blocks for a particular event combination.
32 | @param controlEvents A bitmask specifying the control events for which the block will be removed.
33 | @see addEventHandler:forControlEvents:
34 | */
35 | - (void)bk_removeEventHandlersForControlEvents:(UIControlEvents)controlEvents;
36 |
37 | /** Checks to see if the control has any blocks for a particular event combination.
38 | @param controlEvents A bitmask specifying the control events for which to check for blocks.
39 | @see addEventHandler:forControlEvents:
40 | @return Returns YES if there are blocks for these control events, NO otherwise.
41 | */
42 | - (BOOL)bk_hasEventHandlersForControlEvents:(UIControlEvents)controlEvents;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import
7 | #import "UIControl+BlocksKit.h"
8 |
9 | static const void *BKControlHandlersKey = &BKControlHandlersKey;
10 |
11 | #pragma mark Private
12 |
13 | @interface BKControlWrapper : NSObject
14 |
15 | - (id)initWithHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents;
16 |
17 | @property (nonatomic) UIControlEvents controlEvents;
18 | @property (nonatomic, copy) void (^handler)(id sender);
19 |
20 | @end
21 |
22 | @implementation BKControlWrapper
23 |
24 | - (id)initWithHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents
25 | {
26 | self = [super init];
27 | if (!self) return nil;
28 |
29 | self.handler = handler;
30 | self.controlEvents = controlEvents;
31 |
32 | return self;
33 | }
34 |
35 | - (id)copyWithZone:(NSZone *)zone
36 | {
37 | return [[BKControlWrapper alloc] initWithHandler:self.handler forControlEvents:self.controlEvents];
38 | }
39 |
40 | - (void)invoke:(id)sender
41 | {
42 | self.handler(sender);
43 | }
44 |
45 | @end
46 |
47 | #pragma mark Category
48 |
49 | @implementation UIControl (BlocksKit)
50 |
51 | - (void)bk_addEventHandler:(void (^)(id sender))handler forControlEvents:(UIControlEvents)controlEvents
52 | {
53 | NSParameterAssert(handler);
54 |
55 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey);
56 | if (!events) {
57 | events = [NSMutableDictionary dictionary];
58 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
59 | }
60 |
61 | NSNumber *key = @(controlEvents);
62 | NSMutableSet *handlers = events[key];
63 | if (!handlers) {
64 | handlers = [NSMutableSet set];
65 | events[key] = handlers;
66 | }
67 |
68 | BKControlWrapper *target = [[BKControlWrapper alloc] initWithHandler:handler forControlEvents:controlEvents];
69 | [handlers addObject:target];
70 | [self addTarget:target action:@selector(invoke:) forControlEvents:controlEvents];
71 | }
72 |
73 | - (void)bk_removeEventHandlersForControlEvents:(UIControlEvents)controlEvents
74 | {
75 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey);
76 | if (!events) {
77 | events = [NSMutableDictionary dictionary];
78 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
79 | }
80 |
81 | NSNumber *key = @(controlEvents);
82 | NSSet *handlers = events[key];
83 |
84 | if (!handlers)
85 | return;
86 |
87 | [handlers enumerateObjectsUsingBlock:^(id sender, BOOL *stop) {
88 | [self removeTarget:sender action:NULL forControlEvents:controlEvents];
89 | }];
90 |
91 | [events removeObjectForKey:key];
92 | }
93 |
94 | - (BOOL)bk_hasEventHandlersForControlEvents:(UIControlEvents)controlEvents
95 | {
96 | NSMutableDictionary *events = objc_getAssociatedObject(self, BKControlHandlersKey);
97 | if (!events) {
98 | events = [NSMutableDictionary dictionary];
99 | objc_setAssociatedObject(self, BKControlHandlersKey, events, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
100 | }
101 |
102 | NSNumber *key = @(controlEvents);
103 | NSSet *handlers = events[key];
104 |
105 | if (!handlers)
106 | return NO;
107 |
108 | return !!handlers.count;
109 | }
110 |
111 | @end
112 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+BlocksKit.h
3 | // BlocksKit
4 | //
5 | // Contributed by Yas Kuraishi.
6 | //
7 |
8 | #import
9 |
10 | /** UIImagePickerController with block callback.
11 |
12 | Created by [Yas Kuraishi](https://github.com/YasKuraishi) and contributed to
13 | BlocksKit.
14 |
15 | @warning UIImagePickerController is only available on a platform with
16 | UIKit.
17 | */
18 | @interface UIImagePickerController (BlocksKit)
19 |
20 | /**
21 | * The block that fires after the receiver finished picking up an image
22 | */
23 | @property (nonatomic, copy) void(^bk_didFinishPickingMediaBlock)(UIImagePickerController *, NSDictionary *);
24 |
25 | /**
26 | * The block that fires after the user cancels out of picker
27 | */
28 | @property (nonatomic, copy) void(^bk_didCancelBlock)(UIImagePickerController *);
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImagePickerController+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "NSObject+A2BlockDelegate.h"
8 | #import "UIImagePickerController+BlocksKit.h"
9 |
10 | #pragma mark Custom delegate
11 |
12 | @interface A2DynamicUIImagePickerControllerDelegate : A2DynamicDelegate
13 |
14 | @end
15 |
16 | @implementation A2DynamicUIImagePickerControllerDelegate
17 |
18 | - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
19 | id realDelegate = self.realDelegate;
20 | if (realDelegate && [realDelegate respondsToSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)])
21 | [realDelegate imagePickerController:picker didFinishPickingMediaWithInfo:info];
22 |
23 | void (^block)(UIImagePickerController *, NSDictionary *) = [self blockImplementationForMethod:_cmd];
24 | if (block) block(picker, info);
25 | }
26 |
27 | - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
28 | id realDelegate = self.realDelegate;
29 | if (realDelegate && [realDelegate respondsToSelector:@selector(imagePickerControllerDidCancel:)])
30 | [realDelegate imagePickerControllerDidCancel:picker];
31 |
32 | void (^block)(UIImagePickerController *) = [self blockImplementationForMethod:_cmd];
33 | if (block) block(picker);
34 | }
35 |
36 | @end
37 |
38 | #pragma mark Category
39 |
40 | @implementation UIImagePickerController (BlocksKit)
41 |
42 | @dynamic bk_didFinishPickingMediaBlock;
43 | @dynamic bk_didCancelBlock;
44 |
45 | + (void)load
46 | {
47 | @autoreleasepool {
48 | [self bk_registerDynamicDelegate];
49 | [self bk_linkDelegateMethods:@{ @"bk_didFinishPickingMediaBlock": @"imagePickerController:didFinishPickingMediaWithInfo:",
50 | @"bk_didCancelBlock": @"imagePickerControllerDidCancel:" }];
51 | }
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIPopoverController+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block functionality for UIPopoverController.
9 |
10 | Created by [Alexsander Akers](https://github.com/a2) and contributed to BlocksKit.
11 |
12 | @warning UIPopovercontroller is only available on a platform with UIKit.
13 | */
14 | @interface UIPopoverController (BlocksKit)
15 |
16 | /** The block to be called when the popover controller will dismiss the popover. Return NO to prevent the dismissal of the view. */
17 | @property (nonatomic, copy, setter = bk_setShouldDismissBlock:) BOOL (^bk_shouldDismissBlock)(UIPopoverController *popoverController);
18 |
19 | /** The block to be called when the user has taken action to dismiss the popover. This is not called when -dismissPopoverAnimated: is called directly. */
20 | @property (nonatomic, copy, setter = bk_setDidDismissBlock:) void (^bk_didDismissBlock)(UIPopoverController *popoverController);
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIPopoverController+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "NSObject+A2BlockDelegate.h"
8 | #import "UIPopoverController+BlocksKit.h"
9 |
10 | #pragma mark - Delegate
11 |
12 | @interface A2DynamicUIPopoverControllerDelegate : A2DynamicDelegate
13 |
14 | @end
15 |
16 | @implementation A2DynamicUIPopoverControllerDelegate
17 |
18 | - (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
19 | {
20 | BOOL should = YES;
21 |
22 | id realDelegate = self.realDelegate;
23 | if (realDelegate && [realDelegate respondsToSelector:@selector(popoverControllerShouldDismissPopover:)])
24 | should &= [realDelegate popoverControllerShouldDismissPopover:popoverController];
25 |
26 | BOOL (^block)(UIPopoverController *) = [self blockImplementationForMethod:_cmd];
27 | if (block) should &= block(popoverController);
28 |
29 | return should;
30 | }
31 |
32 | - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
33 | {
34 | id realDelegate = self.realDelegate;
35 | if (realDelegate && [realDelegate respondsToSelector:@selector(popoverControllerDidDismissPopover:)])
36 | [realDelegate popoverControllerDidDismissPopover:popoverController];
37 |
38 | void (^block)(UIPopoverController *) = [self blockImplementationForMethod:_cmd];
39 | if (block) block(popoverController);
40 | }
41 |
42 | @end
43 |
44 | #pragma mark - Category
45 |
46 | @implementation UIPopoverController (BlocksKit)
47 |
48 | @dynamic bk_didDismissBlock, bk_shouldDismissBlock;
49 |
50 | + (void)load
51 | {
52 | @autoreleasepool {
53 | [self bk_registerDynamicDelegate];
54 | [self bk_linkDelegateMethods:@{ @"bk_didDismissBlock": @"popoverControllerDidDismissPopover:", @"bk_shouldDismissBlock": @"popoverControllerShouldDismissPopover:" }];
55 | }
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+BlocksKit.h
3 | // BlocksKit
4 | //
5 | // Contributed by Samuel E. Giddins.
6 | //
7 |
8 | #import
9 | #import "BlocksKit.h"
10 |
11 | /** Block callbacks for UITextField.
12 |
13 | @warning UITextField is only available on a platform with UIKit.
14 |
15 | Created by [Samuel E. Giddins](https://github.com/segiddins) and
16 | contributed to BlocksKit.
17 | */
18 | @interface UITextField (BlocksKit)
19 |
20 | /**
21 | * The block that fires before the receiver begins editing
22 | *
23 | * The return value indicates whether the receiver should begin editing
24 | */
25 | @property (nonatomic, copy) BOOL(^bk_shouldBeginEditingBlock)(UITextField *);
26 |
27 | /**
28 | * The block that fires after the receiver begins editing
29 | */
30 | @property (nonatomic, copy) void(^bk_didBeginEditingBlock)(UITextField *);
31 |
32 | /**
33 | * The block that fires before the receiver ends editing
34 | *
35 | * The return value indicates whether the receiver should end editing
36 | */
37 | @property (nonatomic, copy) BOOL(^bk_shouldEndEditingBlock)(UITextField *);
38 |
39 | /**
40 | * The block that fires after the receiver ends editing
41 | */
42 | @property (nonatomic, copy) void(^bk_didEndEditingBlock)(UITextField *);
43 |
44 | /**
45 | * The block that fires when the receiver's text will change
46 | *
47 | * The return value indicates whether the receiver should replace the characters in the given range with the replacement string
48 | */
49 | @property (nonatomic, copy) BOOL(^bk_shouldChangeCharactersInRangeWithReplacementStringBlock)(UITextField *, NSRange, NSString *);
50 |
51 | /**
52 | * The block that fires when the receiver's clear button is pressed
53 | *
54 | * The return value indicates whether the receiver should clear its contents
55 | */
56 | @property (nonatomic, copy) BOOL(^bk_shouldClearBlock)(UITextField *);
57 |
58 | /**
59 | * The block that fires when the keyboard's return button is pressed and the receiver is the first responder
60 | *
61 | * The return value indicates whether the receiver should return
62 | */
63 | @property (nonatomic, copy) BOOL(^bk_shouldReturnBlock)(UITextField *);
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Convenience on-touch methods for UIView.
9 |
10 | Includes code by the following:
11 |
12 | - Kevin O'Neill. . 2011. BSD.
13 | - Jake Marsh. . 2011.
14 | - Zach Waldowski. . 2011.
15 |
16 | @warning UIView is only available on a platform with UIKit.
17 | */
18 | @interface UIView (BlocksKit)
19 |
20 | /** Abstract creation of a block-backed UITapGestureRecognizer.
21 |
22 | This method allows for the recognition of any arbitrary number
23 | of fingers tapping any number of times on a view. An instance
24 | of UITapGesture recognizer is allocated for the block and added
25 | to the recieving view.
26 |
27 | @warning This method has an _additive_ effect. Do not call it multiple
28 | times to set-up or tear-down. The view will discard the gesture recognizer
29 | on release.
30 |
31 | @param numberOfTouches The number of fingers tapping that will trigger the block.
32 | @param numberOfTaps The number of taps required to trigger the block.
33 | @param block The handler for the UITapGestureRecognizer
34 | @see whenTapped:
35 | @see whenDoubleTapped:
36 | */
37 | - (void)bk_whenTouches:(NSUInteger)numberOfTouches tapped:(NSUInteger)numberOfTaps handler:(void (^)(void))block;
38 |
39 | /** Adds a recognizer for one finger tapping once.
40 |
41 | @warning This method has an _additive_ effect. Do not call it multiple
42 | times to set-up or tear-down. The view will discard the gesture recognizer
43 | on release.
44 |
45 | @param block The handler for the tap recognizer
46 | @see whenDoubleTapped:
47 | @see whenTouches:tapped:handler:
48 | */
49 | - (void)bk_whenTapped:(void (^)(void))block;
50 |
51 | /** Adds a recognizer for one finger tapping twice.
52 |
53 | @warning This method has an _additive_ effect. Do not call it multiple
54 | times to set-up or tear-down. The view will discard the gesture recognizer
55 | on release.
56 |
57 | @param block The handler for the tap recognizer
58 | @see whenTapped:
59 | @see whenTouches:tapped:handler:
60 | */
61 | - (void)bk_whenDoubleTapped:(void (^)(void))block;
62 |
63 | /** A convenience wrapper that non-recursively loops through the subviews of a view.
64 |
65 | @param block A code block that interacts with a UIView sender.
66 | */
67 | - (void)bk_eachSubview:(void (^)(UIView *subview))block;
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "UIGestureRecognizer+BlocksKit.h"
7 | #import "UIView+BlocksKit.h"
8 |
9 | @implementation UIView (BlocksKit)
10 |
11 | - (void)bk_whenTouches:(NSUInteger)numberOfTouches tapped:(NSUInteger)numberOfTaps handler:(void (^)(void))block
12 | {
13 | if (!block) return;
14 |
15 | UITapGestureRecognizer *gesture = [UITapGestureRecognizer bk_recognizerWithHandler:^(UIGestureRecognizer *sender, UIGestureRecognizerState state, CGPoint location) {
16 | if (state == UIGestureRecognizerStateRecognized) block();
17 | }];
18 |
19 | gesture.numberOfTouchesRequired = numberOfTouches;
20 | gesture.numberOfTapsRequired = numberOfTaps;
21 |
22 | [self.gestureRecognizers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
23 | if (![obj isKindOfClass:[UITapGestureRecognizer class]]) return;
24 |
25 | UITapGestureRecognizer *tap = obj;
26 | BOOL rightTouches = (tap.numberOfTouchesRequired == numberOfTouches);
27 | BOOL rightTaps = (tap.numberOfTapsRequired == numberOfTaps);
28 | if (rightTouches && rightTaps) {
29 | [gesture requireGestureRecognizerToFail:tap];
30 | }
31 | }];
32 |
33 | [self addGestureRecognizer:gesture];
34 | }
35 |
36 | - (void)bk_whenTapped:(void (^)(void))block
37 | {
38 | [self bk_whenTouches:1 tapped:1 handler:block];
39 | }
40 |
41 | - (void)bk_whenDoubleTapped:(void (^)(void))block
42 | {
43 | [self bk_whenTouches:2 tapped:1 handler:block];
44 | }
45 |
46 | - (void)bk_eachSubview:(void (^)(UIView *subview))block
47 | {
48 | NSParameterAssert(block != nil);
49 |
50 | [self.subviews enumerateObjectsUsingBlock:^(UIView *subview, NSUInteger idx, BOOL *stop) {
51 | block(subview);
52 | }];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIWebView+BlocksKit.h
3 | // BlocksKit
4 | //
5 |
6 | #import
7 |
8 | /** Block callbacks for UIWebView.
9 |
10 | @warning UIWebView is only available on a platform with UIKit.
11 | */
12 |
13 | @interface UIWebView (BlocksKit)
14 |
15 | /** The block to be decide whether a URL will be loaded.
16 |
17 | @warning If the delegate implements webView:shouldStartLoadWithRequest:navigationType:,
18 | the return values of both the delegate method and the block will be considered.
19 | */
20 | @property (nonatomic, copy, setter = bk_setShouldStartLoadBlock:) BOOL (^bk_shouldStartLoadBlock)(UIWebView *webView, NSURLRequest *request, UIWebViewNavigationType navigationType);
21 |
22 | /** The block that is fired when the web view starts loading. */
23 | @property (nonatomic, copy, setter = bk_setDidStartLoadBlock:) void (^bk_didStartLoadBlock)(UIWebView *webView);
24 |
25 | /** The block that is fired when the web view finishes loading. */
26 | @property (nonatomic, copy, setter = bk_setDidFinishLoadBlock:) void (^bk_didFinishLoadBlock)(UIWebView *webView);
27 |
28 | /** The block that is fired when the web view stops loading due to an error. */
29 | @property (nonatomic, copy, setter = bk_setDidFinishWithErrorBlock:) void (^bk_didFinishWithErrorBlock)(UIWebView *webView, NSError *error);
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIWebView+BlocksKit.m
3 | // BlocksKit
4 | //
5 |
6 | #import "A2DynamicDelegate.h"
7 | #import "NSObject+A2BlockDelegate.h"
8 | #import "UIWebView+BlocksKit.h"
9 |
10 | #pragma mark Custom delegate
11 |
12 | @interface A2DynamicUIWebViewDelegate : A2DynamicDelegate
13 | @end
14 |
15 | @implementation A2DynamicUIWebViewDelegate
16 |
17 | - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
18 | BOOL ret = YES;
19 |
20 | id realDelegate = self.realDelegate;
21 | if (realDelegate && [realDelegate respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)])
22 | ret = [realDelegate webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
23 |
24 | BOOL (^block)(UIWebView *, NSURLRequest *, UIWebViewNavigationType) = [self blockImplementationForMethod:_cmd];
25 | if (block)
26 | ret &= block(webView, request, navigationType);
27 |
28 | return ret;
29 | }
30 |
31 | - (void)webViewDidStartLoad:(UIWebView *)webView {
32 | id realDelegate = self.realDelegate;
33 | if (realDelegate && [realDelegate respondsToSelector:@selector(webViewDidStartLoad:)])
34 | [realDelegate webViewDidStartLoad:webView];
35 |
36 | void (^block)(UIWebView *) = [self blockImplementationForMethod:_cmd];
37 | if (block) block(webView);
38 | }
39 |
40 | - (void)webViewDidFinishLoad:(UIWebView *)webView {
41 | id realDelegate = self.realDelegate;
42 | if (realDelegate && [realDelegate respondsToSelector:@selector(webViewDidFinishLoad:)])
43 | [realDelegate webViewDidFinishLoad:webView];
44 |
45 | void (^block)(UIWebView *) = [self blockImplementationForMethod:_cmd];
46 | if (block) block(webView);
47 | }
48 |
49 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
50 | id realDelegate = self.realDelegate;
51 | if (realDelegate && [realDelegate respondsToSelector:@selector(webView:didFailLoadWithError:)])
52 | [realDelegate webView:webView didFailLoadWithError:error];
53 |
54 | void (^block)(UIWebView *, NSError *) = [self blockImplementationForMethod:_cmd];
55 | if (block) block(webView, error);
56 | }
57 |
58 | @end
59 |
60 | #pragma mark Category
61 |
62 | @implementation UIWebView (BlocksKit)
63 |
64 | @dynamic bk_shouldStartLoadBlock, bk_didStartLoadBlock, bk_didFinishLoadBlock, bk_didFinishWithErrorBlock;
65 |
66 | + (void)load
67 | {
68 | @autoreleasepool {
69 | [self bk_registerDynamicDelegate];
70 | [self bk_linkDelegateMethods:@{
71 | @"bk_shouldStartLoadBlock": @"webView:shouldStartLoadWithRequest:navigationType:",
72 | @"bk_didStartLoadBlock": @"webViewDidStartLoad:",
73 | @"bk_didFinishLoadBlock": @"webViewDidFinishLoad:",
74 | @"bk_didFinishWithErrorBlock": @"webView:didFailLoadWithError:"
75 | }];
76 | }
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/LICENSE:
--------------------------------------------------------------------------------
1 | //
2 | // LICENSE
3 | // BlocksKit
4 | //
5 |
6 | Copyright (c) 2011-2014 Zachary Waldowski, Alexsander Akers, and the BlocksKit Contributors
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 |
12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 |
--------------------------------------------------------------------------------
/Pods/BlocksKit/README.md:
--------------------------------------------------------------------------------
1 | [BlocksKit](https://zwaldowski.github.io/BlocksKit)
2 | ===================================================
3 |
4 | Blocks in C and Objective-C are downright magical. They make coding easier and potentially quicker, not to mention faster on the front end with multithreading and Grand Central Dispatch. BlocksKit hopes to facilitate this kind of programming by removing some of the annoying - and, in some cases, impeding - limits on coding with blocks.
5 |
6 | BlocksKit is a framework for OS X Mountain Lion and newer and a static library for iOS 6 and newer.
7 |
8 | BlocksKit was created by [Zachary Waldowski](https://github.com/zwaldowski) and [Alexsander Akers](https://github.com/a2) and is maintained by Zachary Waldowski.
9 |
10 | Installation
11 | ============
12 |
13 | BlocksKit can be added to a project using [CocoaPods](https://github.com/cocoapods/cocoapods). One may also use targets included in the project.
14 |
15 | ### Library
16 |
17 | * Download a release of BlocksKit.
18 | * Run "Archive" in XCode.
19 | * By default the static library will be compiled to `~/Library/Developer/Xcode/DerivedData`.
20 | * Move libBlocksKit.a and Headers to your project's folder, preferably a subfolder like "Vendor".
21 | * In "Build Phases", Drag libBlocksKit.a into your target's "Link Binary With Libraries" build phase.
22 | * In the build settings of your target or project, change "Other Linker Flags" to `-ObjC`. Make sure your app is linked with CoreGraphics, Foundation, MessageUI, and UIKit.
23 | * Change (or add) to "Header Search Paths" the relative path to BlocksKit's headers, like `$(SRCROOT)/Vendor/Headers`.
24 | * Insert `#import ` in your project's prefix header.
25 |
26 | ### Framework
27 |
28 | See the included `Configurations/MacBundleFramework.xcconfig` for more information.
29 |
30 | Documentation
31 | =============
32 |
33 | An Xcode-compatible documentation set is available [from CocoaDocs](http://cocoadocs.org/docsets/BlocksKit/).
34 |
35 | License
36 | =======
37 |
38 | BlocksKit is maintained under the MIT license. **The project itself is free for use in any and all projects.** You can use BlocksKit in any project, public or private, with or without attribution - though we prefer attribution! It helps us.
39 |
40 | Unsure about your rights? [Read more.](http://opensource.org/licenses/MIT)
41 |
42 | Individual credits for included code exist in the header files and documentation. We thank them for their contributions to the open source community.
43 |
--------------------------------------------------------------------------------
/Pods/Headers/Private/Aspects/Aspects.h:
--------------------------------------------------------------------------------
1 | ../../../Aspects/Aspects.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/A2BlockInvocation.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2BlockInvocation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/A2DynamicDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2DynamicDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/BKMacros.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/BKMacros.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/BlocksKit+MessageUI.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit+MessageUI.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/BlocksKit+UIKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit+UIKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/MFMailComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/MFMessageComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSArray+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSArray+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSCache+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSDictionary+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSIndexSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSInvocation+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSMutableArray+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSMutableDictionary+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSMutableIndexSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSMutableOrderedSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSMutableSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSObject+A2BlockDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2BlockDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSObject+A2DynamicDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSObject+BKAssociatedObjects.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSObject+BKBlockExecution.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSObject+BKBlockObservation.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSOrderedSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSTimer+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/NSURLConnection+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSURLConnection+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIActionSheet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIActionSheet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIAlertView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIAlertView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIBarButtonItem+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIControl+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIGestureRecognizer+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIGestureRecognizer+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIImagePickerController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIPopoverController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UITextField+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/BlocksKit/UIWebView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.h:
--------------------------------------------------------------------------------
1 | ../../../ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.h
--------------------------------------------------------------------------------
/Pods/Headers/Private/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers.h:
--------------------------------------------------------------------------------
1 | ../../../ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Aspects/Aspects.h:
--------------------------------------------------------------------------------
1 | ../../../Aspects/Aspects.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/A2BlockInvocation.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2BlockInvocation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/A2DynamicDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/A2DynamicDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/BKMacros.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/BKMacros.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/BlocksKit+MessageUI.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit+MessageUI.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/BlocksKit+UIKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit+UIKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/MFMailComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMailComposeViewController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/MFMessageComposeViewController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/MessageUI/MFMessageComposeViewController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSArray+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSArray+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSCache+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSCache+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSDictionary+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSIndexSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSInvocation+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSMutableArray+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSMutableDictionary+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSMutableIndexSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSMutableOrderedSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSMutableSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSObject+A2BlockDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2BlockDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSObject+A2DynamicDelegate.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/NSObject+A2DynamicDelegate.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSObject+BKAssociatedObjects.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSObject+BKBlockExecution.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSObject+BKBlockObservation.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSOrderedSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSSet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSSet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSTimer+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/NSURLConnection+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/DynamicDelegate/Foundation/NSURLConnection+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIActionSheet+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIActionSheet+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIAlertView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIAlertView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIBarButtonItem+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIBarButtonItem+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIControl+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIControl+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIGestureRecognizer+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIGestureRecognizer+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIImagePickerController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIImagePickerController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIPopoverController+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIPopoverController+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UITextField+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UITextField+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/BlocksKit/UIWebView+BlocksKit.h:
--------------------------------------------------------------------------------
1 | ../../../BlocksKit/BlocksKit/UIKit/UIWebView+BlocksKit.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASCompositeConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint+Private.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint+Private.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASConstraintMaker.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASLayoutConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASUtilities.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewAttribute.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/MASViewConstraint.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/Masonry.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.h:
--------------------------------------------------------------------------------
1 | ../../../ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers.h:
--------------------------------------------------------------------------------
1 | ../../../ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers.h
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Aspects (1.4.1)
3 | - BlocksKit (2.2.5):
4 | - BlocksKit/All (= 2.2.5)
5 | - BlocksKit/All (2.2.5):
6 | - BlocksKit/Core
7 | - BlocksKit/DynamicDelegate
8 | - BlocksKit/MessageUI
9 | - BlocksKit/UIKit
10 | - BlocksKit/Core (2.2.5)
11 | - BlocksKit/DynamicDelegate (2.2.5)
12 | - BlocksKit/MessageUI (2.2.5):
13 | - BlocksKit/Core
14 | - BlocksKit/DynamicDelegate
15 | - BlocksKit/UIKit (2.2.5):
16 | - BlocksKit/Core
17 | - BlocksKit/DynamicDelegate
18 | - Masonry (0.6.1)
19 | - ObjcAssociatedObjectHelpers (2.0.0):
20 | - ObjcAssociatedObjectHelpers/Core (= 2.0.0)
21 | - ObjcAssociatedObjectHelpers/NSObject+Dictionary (= 2.0.0)
22 | - ObjcAssociatedObjectHelpers/Core (2.0.0)
23 | - ObjcAssociatedObjectHelpers/NSObject+Dictionary (2.0.0):
24 | - ObjcAssociatedObjectHelpers/Core
25 |
26 | DEPENDENCIES:
27 | - Aspects
28 | - BlocksKit
29 | - Masonry
30 | - ObjcAssociatedObjectHelpers
31 |
32 | SPEC CHECKSUMS:
33 | Aspects: 7595ba96a6727a58ebcbfc954497fc5d2fdde546
34 | BlocksKit: 7f422b971407001178d181a43b99014ea2591fe6
35 | Masonry: 4972309f2f134de9dd312f4dc4a21359b50e6caa
36 | ObjcAssociatedObjectHelpers: 17b4253952858ff98a31b2a9fbe672294e43bf92
37 |
38 | COCOAPODS: 0.36.1
39 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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
19 | */
20 | @property (nonatomic, weak, readonly) MAS_VIEW *view;
21 |
22 | /**
23 | * The attribute which the reciever relates to
24 | */
25 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
26 |
27 | /**
28 | * The designated initializer.
29 | */
30 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
31 |
32 | /**
33 | * Determine whether the layoutAttribute is a size attribute
34 | *
35 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
36 | */
37 | - (BOOL)isSizeAttribute;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/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 = [super init];
15 | if (!self) return nil;
16 |
17 | _view = view;
18 | _layoutAttribute = layoutAttribute;
19 |
20 | return self;
21 | }
22 |
23 | - (BOOL)isSizeAttribute {
24 | return self.layoutAttribute == NSLayoutAttributeWidth
25 | || self.layoutAttribute == NSLayoutAttributeHeight;
26 | }
27 |
28 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
29 | if ([viewAttribute isKindOfClass:self.class]) {
30 | return self.view == viewAttribute.view
31 | && self.layoutAttribute == viewAttribute.layoutAttribute;
32 | }
33 | return [super isEqual:viewAttribute];
34 | }
35 |
36 | - (NSUInteger)hash {
37 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 "MASUtilities.h"
10 | #import "View+MASAdditions.h"
11 | #import "View+MASShorthandAdditions.h"
12 | #import "NSArray+MASAdditions.h"
13 | #import "NSArray+MASShorthandAdditions.h"
14 | #import "MASConstraint.h"
15 | #import "MASCompositeConstraint.h"
16 | #import "MASViewAttribute.h"
17 | #import "MASViewConstraint.h"
18 | #import "MASConstraintMaker.h"
19 | #import "MASLayoutConstraint.h"
20 | #import "NSLayoutConstraint+MASDebugAdditions.h"
21 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.h
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | @interface NSArray (MASAdditions)
14 |
15 | /**
16 | * Creates a MASConstraintMaker with each view in the callee.
17 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
18 | *
19 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
20 | *
21 | * @return Array of created MASConstraints
22 | */
23 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block;
24 |
25 | /**
26 | * Creates a MASConstraintMaker with each view in the callee.
27 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
28 | * If an existing constraint exists then it will be updated instead.
29 | *
30 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
31 | *
32 | * @return Array of created/updated MASConstraints
33 | */
34 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block;
35 |
36 | /**
37 | * Creates a MASConstraintMaker with each view in the callee.
38 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
39 | * All constraints previously installed for the views will be removed.
40 | *
41 | * @param block scope within which you can build up the constraints which you wish to apply to each view.
42 | *
43 | * @return Array of created/updated MASConstraints
44 | */
45 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/NSArray+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.m
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 | #import "View+MASAdditions.h"
11 |
12 | @implementation NSArray (MASAdditions)
13 |
14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block {
15 | NSMutableArray *constraints = [NSMutableArray array];
16 | for (MAS_VIEW *view in self) {
17 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
18 | [constraints addObjectsFromArray:[view mas_makeConstraints:block]];
19 | }
20 | return constraints;
21 | }
22 |
23 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block {
24 | NSMutableArray *constraints = [NSMutableArray array];
25 | for (MAS_VIEW *view in self) {
26 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
27 | [constraints addObjectsFromArray:[view mas_updateConstraints:block]];
28 | }
29 | return constraints;
30 | }
31 |
32 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
33 | NSMutableArray *constraints = [NSMutableArray array];
34 | for (MAS_VIEW *view in self) {
35 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
36 | [constraints addObjectsFromArray:[view mas_remakeConstraints:block]];
37 | }
38 | return constraints;
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/View+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MASAdditions.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 "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | /**
14 | * Provides constraint maker block
15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs
16 | */
17 | @interface MAS_VIEW (MASAdditions)
18 |
19 | /**
20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute
21 | */
22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom;
26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading;
27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing;
28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width;
29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height;
30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX;
31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY;
32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline;
33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr);
34 |
35 | /**
36 | * a key to associate with this view
37 | */
38 | @property (nonatomic, strong) id mas_key;
39 |
40 | /**
41 | * Finds the closest common superview between this view and another view
42 | *
43 | * @param view other view
44 | *
45 | * @return returns nil if common superview could not be found
46 | */
47 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view;
48 |
49 | /**
50 | * Creates a MASConstraintMaker with the callee view.
51 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing
52 | *
53 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
54 | *
55 | * @return Array of created MASConstraints
56 | */
57 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block;
58 |
59 | /**
60 | * Creates a MASConstraintMaker with the callee view.
61 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
62 | * If an existing constraint exists then it will be updated instead.
63 | *
64 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
65 | *
66 | * @return Array of created/updated MASConstraints
67 | */
68 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block;
69 |
70 | /**
71 | * Creates a MASConstraintMaker with the callee view.
72 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
73 | * All constraints previously installed for the view will be removed.
74 | *
75 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
76 | *
77 | * @return Array of created/updated MASConstraints
78 | */
79 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block;
80 |
81 | @end
82 |
--------------------------------------------------------------------------------
/Pods/Masonry/Masonry/View+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+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 "View+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand view additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface MAS_VIEW (MASShorthandAdditions)
18 |
19 | @property (nonatomic, strong, readonly) MASViewAttribute *left;
20 | @property (nonatomic, strong, readonly) MASViewAttribute *top;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *right;
22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom;
23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading;
24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing;
25 | @property (nonatomic, strong, readonly) MASViewAttribute *width;
26 | @property (nonatomic, strong, readonly) MASViewAttribute *height;
27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX;
28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY;
29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline;
30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr);
31 |
32 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
33 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
34 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
35 |
36 | @end
37 |
38 | #define MAS_ATTR_FORWARD(attr) \
39 | - (MASViewAttribute *)attr { \
40 | return [self mas_##attr]; \
41 | }
42 |
43 | @implementation MAS_VIEW (MASShorthandAdditions)
44 |
45 | MAS_ATTR_FORWARD(top);
46 | MAS_ATTR_FORWARD(left);
47 | MAS_ATTR_FORWARD(bottom);
48 | MAS_ATTR_FORWARD(right);
49 | MAS_ATTR_FORWARD(leading);
50 | MAS_ATTR_FORWARD(trailing);
51 | MAS_ATTR_FORWARD(width);
52 | MAS_ATTR_FORWARD(height);
53 | MAS_ATTR_FORWARD(centerX);
54 | MAS_ATTR_FORWARD(centerY);
55 | MAS_ATTR_FORWARD(baseline);
56 |
57 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute {
58 | return [self mas_attribute];
59 | }
60 |
61 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
62 | return [self mas_makeConstraints:block];
63 | }
64 |
65 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
66 | return [self mas_updateConstraints:block];
67 | }
68 |
69 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
70 | return [self mas_remakeConstraints:block];
71 | }
72 |
73 | @end
74 |
75 | #endif
76 |
--------------------------------------------------------------------------------
/Pods/ObjcAssociatedObjectHelpers/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright © 2013 Jonathan Crooke
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
5 | associated documentation files (the “Software”), to deal in the Software without restriction, including
6 | without limitation the rights 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 to do so, subject
8 | to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or substantial
11 | 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 |
--------------------------------------------------------------------------------
/Pods/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+AssociatedDictionary.h
3 | // ObjcAssociatedObjectHelpers
4 | //
5 | // Created by Jon Crooke on 02/10/2012.
6 | // Copyright (c) 2012 Jonathan Crooke. All rights reserved.
7 | //
8 | // Permission is hereby granted, free of charge, to any person obtaining a copy
9 | // of this software and associated documentation files (the "Software"), to deal
10 | // in the Software without restriction, including without limitation the rights
11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | // copies of the Software, and to permit persons to whom the Software is
13 | // furnished to do so, subject to the following conditions:
14 | //
15 | // The above copyright notice and this permission notice shall be included in
16 | // all copies or substantial portions of the Software.
17 | //
18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | // SOFTWARE.
25 |
26 | #import
27 |
28 | /**
29 | * Category to add a lazily-instantiated `NSMutableDictionary` instance
30 | * to `NSObject`.
31 | */
32 | @interface NSObject (AssociatedDictionary)
33 | /**
34 | * Lazily instantiated mutable dictionary
35 | */
36 | @property (readonly) NSMutableDictionary *ascObj_dictionary;
37 | @end
38 |
--------------------------------------------------------------------------------
/Pods/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/NSObject+AssociatedDictionary.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+AssociatedDictionary.m
3 | // ObjcAssociatedObjectHelpers
4 | //
5 | // Created by Jon Crooke on 02/10/2012.
6 | // Copyright (c) 2012 Jonathan Crooke. All rights reserved.
7 | //
8 | // Permission is hereby granted, free of charge, to any person obtaining a copy
9 | // of this software and associated documentation files (the "Software"), to deal
10 | // in the Software without restriction, including without limitation the rights
11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | // copies of the Software, and to permit persons to whom the Software is
13 | // furnished to do so, subject to the following conditions:
14 | //
15 | // The above copyright notice and this permission notice shall be included in
16 | // all copies or substantial portions of the Software.
17 | //
18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | // SOFTWARE.
25 |
26 | #import "NSObject+AssociatedDictionary.h"
27 | #import "ObjcAssociatedObjectHelpers.h"
28 |
29 | @implementation NSObject (AssociatedDictionary)
30 | SYNTHESIZE_ASC_OBJ_LAZY(ascObj_dictionary, NSMutableDictionary);
31 | @end
32 |
--------------------------------------------------------------------------------
/Pods/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers/ObjcAssociatedObjectHelpers.m:
--------------------------------------------------------------------------------
1 | //
2 | // ObjcAssociatedObjectHelpers.m
3 | // ObjcAssociatedObjectHelpers
4 | //
5 | // Created by Jon Crooke on 01/10/2012.
6 | // Copyright (c) 2012 Jonathan Crooke. All rights reserved.
7 | //
8 | // Permission is hereby granted, free of charge, to any person obtaining a copy
9 | // of this software and associated documentation files (the "Software"), to deal
10 | // in the Software without restriction, including without limitation the rights
11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | // copies of the Software, and to permit persons to whom the Software is
13 | // furnished to do so, subject to the following conditions:
14 | //
15 | // The above copyright notice and this permission notice shall be included in
16 | // all copies or substantial portions of the Software.
17 | //
18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | // SOFTWARE.
25 |
26 | #import "ObjcAssociatedObjectHelpers.h"
27 |
28 | #if __has_feature(objc_arc)
29 | @implementation __ObjCAscWeakContainer
30 | + (instancetype)wrapObject:(id)object {
31 | __ObjCAscWeakContainer *wrapper = [[self alloc] init];
32 | wrapper._object = object;
33 | return wrapper;
34 | }
35 | @end
36 | #endif
37 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Aspects/Pods-Aspects-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-Aspects.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Aspects" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = -ObjC
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Aspects/Pods-Aspects-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_Aspects : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_Aspects
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Aspects/Pods-Aspects-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-environment.h"
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Aspects/Pods-Aspects.xcconfig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/Pods/Target Support Files/Pods-Aspects/Pods-Aspects.xcconfig
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-BlocksKit.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BlocksKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = ${PODS_BLOCKSKIT_OTHER_LDFLAGS} -ObjC
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_BlocksKit : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_BlocksKit
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-environment.h"
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit.xcconfig:
--------------------------------------------------------------------------------
1 | PODS_BLOCKSKIT_OTHER_LDFLAGS = -framework "MessageUI"
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Masonry/Pods-Masonry-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-Masonry.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = ${PODS_MASONRY_OTHER_LDFLAGS} -ObjC
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Masonry/Pods-Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Masonry/Pods-Masonry-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-environment.h"
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-Masonry/Pods-Masonry.xcconfig:
--------------------------------------------------------------------------------
1 | PODS_MASONRY_OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit"
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ObjcAssociatedObjectHelpers/Pods-ObjcAssociatedObjectHelpers-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-ObjcAssociatedObjectHelpers.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ObjcAssociatedObjectHelpers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = ${PODS_OBJCASSOCIATEDOBJECTHELPERS_OTHER_LDFLAGS} -ObjC
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ObjcAssociatedObjectHelpers/Pods-ObjcAssociatedObjectHelpers-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ObjcAssociatedObjectHelpers : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ObjcAssociatedObjectHelpers
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ObjcAssociatedObjectHelpers/Pods-ObjcAssociatedObjectHelpers-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-environment.h"
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ObjcAssociatedObjectHelpers/Pods-ObjcAssociatedObjectHelpers.xcconfig:
--------------------------------------------------------------------------------
1 | PODS_OBJCASSOCIATEDOBJECTHELPERS_OTHER_LDFLAGS = -framework "Foundation"
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods : NSObject
3 | @end
4 | @implementation PodsDummy_Pods
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-environment.h:
--------------------------------------------------------------------------------
1 |
2 | // To check if a library is compiled with CocoaPods you
3 | // can use the `COCOAPODS` macro definition which is
4 | // defined in the xcconfigs so it is available in
5 | // headers also when they are imported in the client
6 | // project.
7 |
8 |
9 | // Aspects
10 | #define COCOAPODS_POD_AVAILABLE_Aspects
11 | #define COCOAPODS_VERSION_MAJOR_Aspects 1
12 | #define COCOAPODS_VERSION_MINOR_Aspects 4
13 | #define COCOAPODS_VERSION_PATCH_Aspects 1
14 |
15 | // BlocksKit
16 | #define COCOAPODS_POD_AVAILABLE_BlocksKit
17 | #define COCOAPODS_VERSION_MAJOR_BlocksKit 2
18 | #define COCOAPODS_VERSION_MINOR_BlocksKit 2
19 | #define COCOAPODS_VERSION_PATCH_BlocksKit 5
20 |
21 | // BlocksKit/All
22 | #define COCOAPODS_POD_AVAILABLE_BlocksKit_All
23 | #define COCOAPODS_VERSION_MAJOR_BlocksKit_All 2
24 | #define COCOAPODS_VERSION_MINOR_BlocksKit_All 2
25 | #define COCOAPODS_VERSION_PATCH_BlocksKit_All 5
26 |
27 | // BlocksKit/Core
28 | #define COCOAPODS_POD_AVAILABLE_BlocksKit_Core
29 | #define COCOAPODS_VERSION_MAJOR_BlocksKit_Core 2
30 | #define COCOAPODS_VERSION_MINOR_BlocksKit_Core 2
31 | #define COCOAPODS_VERSION_PATCH_BlocksKit_Core 5
32 |
33 | // BlocksKit/DynamicDelegate
34 | #define COCOAPODS_POD_AVAILABLE_BlocksKit_DynamicDelegate
35 | #define COCOAPODS_VERSION_MAJOR_BlocksKit_DynamicDelegate 2
36 | #define COCOAPODS_VERSION_MINOR_BlocksKit_DynamicDelegate 2
37 | #define COCOAPODS_VERSION_PATCH_BlocksKit_DynamicDelegate 5
38 |
39 | // BlocksKit/MessageUI
40 | #define COCOAPODS_POD_AVAILABLE_BlocksKit_MessageUI
41 | #define COCOAPODS_VERSION_MAJOR_BlocksKit_MessageUI 2
42 | #define COCOAPODS_VERSION_MINOR_BlocksKit_MessageUI 2
43 | #define COCOAPODS_VERSION_PATCH_BlocksKit_MessageUI 5
44 |
45 | // BlocksKit/UIKit
46 | #define COCOAPODS_POD_AVAILABLE_BlocksKit_UIKit
47 | #define COCOAPODS_VERSION_MAJOR_BlocksKit_UIKit 2
48 | #define COCOAPODS_VERSION_MINOR_BlocksKit_UIKit 2
49 | #define COCOAPODS_VERSION_PATCH_BlocksKit_UIKit 5
50 |
51 | // Masonry
52 | #define COCOAPODS_POD_AVAILABLE_Masonry
53 | #define COCOAPODS_VERSION_MAJOR_Masonry 0
54 | #define COCOAPODS_VERSION_MINOR_Masonry 6
55 | #define COCOAPODS_VERSION_PATCH_Masonry 1
56 |
57 | // ObjcAssociatedObjectHelpers
58 | #define COCOAPODS_POD_AVAILABLE_ObjcAssociatedObjectHelpers
59 | #define COCOAPODS_VERSION_MAJOR_ObjcAssociatedObjectHelpers 2
60 | #define COCOAPODS_VERSION_MINOR_ObjcAssociatedObjectHelpers 0
61 | #define COCOAPODS_VERSION_PATCH_ObjcAssociatedObjectHelpers 0
62 |
63 | // ObjcAssociatedObjectHelpers/Core
64 | #define COCOAPODS_POD_AVAILABLE_ObjcAssociatedObjectHelpers_Core
65 | #define COCOAPODS_VERSION_MAJOR_ObjcAssociatedObjectHelpers_Core 2
66 | #define COCOAPODS_VERSION_MINOR_ObjcAssociatedObjectHelpers_Core 0
67 | #define COCOAPODS_VERSION_PATCH_ObjcAssociatedObjectHelpers_Core 0
68 |
69 | // ObjcAssociatedObjectHelpers/NSObject+Dictionary
70 | #define COCOAPODS_POD_AVAILABLE_ObjcAssociatedObjectHelpers_NSObject_Dictionary
71 | #define COCOAPODS_VERSION_MAJOR_ObjcAssociatedObjectHelpers_NSObject_Dictionary 2
72 | #define COCOAPODS_VERSION_MINOR_ObjcAssociatedObjectHelpers_NSObject_Dictionary 0
73 | #define COCOAPODS_VERSION_PATCH_ObjcAssociatedObjectHelpers_NSObject_Dictionary 0
74 |
75 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Aspects" -isystem "${PODS_ROOT}/Headers/Public/BlocksKit" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-Aspects" -l"Pods-BlocksKit" -l"Pods-Masonry" -l"Pods-ObjcAssociatedObjectHelpers" -framework "Foundation" -framework "MessageUI" -framework "UIKit"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Aspects" "${PODS_ROOT}/Headers/Public/BlocksKit" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Aspects" -isystem "${PODS_ROOT}/Headers/Public/BlocksKit" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/ObjcAssociatedObjectHelpers"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-Aspects" -l"Pods-BlocksKit" -l"Pods-Masonry" -l"Pods-ObjcAssociatedObjectHelpers" -framework "Foundation" -framework "MessageUI" -framework "UIKit"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IMY_Theme
2 | Q:为什么要写这个东西?
3 | A:因为我们产品上线一年多了,产品那边忽然来了一个换肤的需求,所以不得考虑一个比较廉价的换肤方式.
4 |
5 | Q:有用到第三方库吗?
6 | A:当然有,用到的库详见Podfile或IMY_Theme.podspec.json 当然你可以修改代码来解除对这些库的依赖.
7 |
8 |
9 | #我们来看看效果
10 | 
11 | #使用方法
12 | UINavigationBar+IMY_Theme.h
13 | - (void)imy_setBackgroundImageWithKey:(NSString *)key forBarMetrics:(UIBarMetrics)barMetrics;
14 |
15 | UITabBarItem+IMY_Theme
16 | - (void)imy_setFinishedSelectedImageName:(NSString *)selectedImageName withFinishedUnselectedImageName:(NSString *)unselectedImageName;
17 |
18 | UIButton+IMY_Theme
19 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state;
20 |
21 | - (void)imy_setImageForKey:(NSString *)key andState:(UIControlState)state stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
22 |
23 | - (void)imy_setCenterResizeImageForKey:(NSString *)key andState:(UIControlState)state;
24 |
25 | - (void)imy_setBackgroundImageForKey:(NSString *)key andState:(UIControlState)state;
26 |
27 | - (void)imy_setCenterResiseBackgroudImageForKey:(NSString *)key andState:(UIControlState)state;
28 |
29 | - (void)imy_setBackgroudImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight forState:(UIControlState)state;
30 |
31 | - (void)imy_setTitleColorForKey:(NSString *)key andState:(UIControlState)state;
32 |
33 | UIImageView+IMY_Theme
34 | - (void)imy_setImageForKey:(NSString *)key;
35 |
36 | - (void)imy_setHighlightedImageForKey:(NSString *)key;
37 |
38 | - (void)imy_setImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
39 |
40 | - (void)imy_setHighlightedImageForKey:(NSString *)key stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;
41 |
42 | - (void)imy_setCenterResizeImageForKey:(NSString *)key;
43 |
44 | - (void)imy_setCenterResizeHighlightedImageForKey:(NSString *)key;
45 |
46 | 背景颜色和文字相关的
47 | @interface UIView (IMY_Theme_BackgroundColor)//请忽略这个category的名字
48 | - (void)imy_setBackgroundColorForKey:(NSString *)key;
49 |
50 | - (void)imy_setTextColorForKey:(NSString *)key;
51 |
52 | - (void)imy_setHighlightedTextColorForKey:(NSString *)key;
53 | @end
54 |
55 | 还有另外一种方式,详见Demo,适用于所有的NSObject
--------------------------------------------------------------------------------
/Untitled.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meiyoudev/IMY_Theme/74fe0ee3988b04bde40b55ba171a5a0a78c3edd4/Untitled.gif
--------------------------------------------------------------------------------