TemplateInfo 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/.gitignore +2 -0
- data/TemplateInfo.gemspec +1 -1
- data/bin/tif_create.rb +157 -0
- data/lib/TemplateInfo/version.rb +1 -1
- data/test.xctemplate/.DS_Store +0 -0
- data/test.xctemplate/TemplateInfo.plist +2830 -0
- data/test.xctemplate/TemplateInfo.xml +2842 -0
- data/test.xctemplate/libs/BeeFramework/Bee.h +35 -0
- data/test.xctemplate/libs/BeeFramework/Bee_Precompile.h +143 -0
- data/test.xctemplate/libs/BeeFramework/Core/Bee_Core.h +36 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Foundation.h +54 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Foundation.mm +33 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Log.h +64 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Log.mm +164 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Performance.h +111 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Performance.mm +122 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Runtime.h +98 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Runtime.mm +437 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Sandbox.h +45 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Sandbox.mm +81 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Singleton.h +47 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Singleton.mm +34 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_SystemInfo.h +62 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_SystemInfo.m +147 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Thread.h +64 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Bee_Thread.mm +91 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSArray+BeeExtension.h +76 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSArray+BeeExtension.m +300 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSData+BeeExtension.h +44 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSData+BeeExtension.m +92 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSDate+BeeExtension.h +44 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSDate+BeeExtension.m +85 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSDictionary+BeeExtension.h +90 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSDictionary+BeeExtension.m +509 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSNumber+BeeExtension.h +50 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSNumber+BeeExtension.m +64 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeJSON.h +43 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeJSON.m +116 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeNotification.h +66 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeNotification.m +150 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeProperty.h +210 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeProperty.m +34 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeTicker.h +41 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeTicker.m +156 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeTypeConversion.h +49 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSObject+BeeTypeConversion.m +109 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSString+BeeExtension.h +86 -0
- data/test.xctemplate/libs/BeeFramework/Core/Foundation/Extension/NSString+BeeExtension.m +464 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_Network.h +36 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_Network.m +33 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_Request.h +144 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_Request.m +560 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_RequestQueue.h +99 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Bee_RequestQueue.m +742 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Extension/NSObject+BeeRequest.h +62 -0
- data/test.xctemplate/libs/BeeFramework/Core/Network/Extension/NSObject+BeeRequest.m +175 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/0.2.4.zip +0 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_ActiveBase.h +133 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_ActiveBase.m +641 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_ActiveRecord.h +106 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_ActiveRecord.m +1956 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Cache.h +91 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Cache.m +318 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Database.h +223 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Database.m +3007 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Keychain.h +55 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Keychain.m +173 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Storage.h +39 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Bee_Storage.m +33 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Extension/NSObject+BeeDatabase.h +47 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Extension/NSObject+BeeDatabase.m +81 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Extension/NSObject+BeeKeychain.h +44 -0
- data/test.xctemplate/libs/BeeFramework/Core/Storage/Extension/NSObject+BeeKeychain.m +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Bee_MVC.h +49 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_Controller.h +66 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_Controller.mm +228 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_Message.h +209 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_Message.mm +873 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_MessageQueue.h +75 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Bee_MessageQueue.mm +389 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+ActiveRecord.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+ActiveRecord.m +150 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+HTTP.h +49 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+HTTP.mm +201 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+JSON.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+JSON.mm +118 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+XML.h +49 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/BeeMessage+XML.mm +78 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/NSObject+BeeMessage.h +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Controller/Extension/NSObject+BeeMessage.mm +138 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Model/Bee_Model.h +64 -0
- data/test.xctemplate/libs/BeeFramework/MVC/Model/Bee_Model.m +190 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIActionSheet.h +71 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIActionSheet.m +307 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIActivityIndicatorView.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIActivityIndicatorView.m +152 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIAlertView.h +73 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIAlertView.m +234 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIButton.h +97 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIButton.m +424 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIDatePicker.h +78 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIDatePicker.m +362 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIGridCell.h +82 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIGridCell.m +298 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIImageView.h +110 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIImageView.m +541 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIKeyboard.h +74 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIKeyboard.m +243 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UILabel.h +46 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UILabel.m +99 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIMatrixView.h +124 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIMatrixView.m +821 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UINavigationBar.h +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UINavigationBar.m +161 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIOrientation.h +60 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIOrientation.m +146 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIPageControl.h +61 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIPageControl.m +190 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIProgressView.h +47 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIProgressView.m +113 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIPullLoader.h +71 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIPullLoader.m +236 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIScrollView.h +146 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIScrollView.m +1487 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UISegmentedControl.h +60 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UISegmentedControl.m +192 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UISignal.h +126 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UISignal.m +453 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITabBar.h +70 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITabBar.m +249 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITextField.h +67 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITextField.m +242 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITextView.h +75 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITextView.m +311 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITipsView.h +184 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UITipsView.m +911 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIWebView.h +65 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIWebView.m +242 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIZoomView.h +91 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_UIZoomView.m +444 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_View.h +72 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Bee_View.m +38 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/CGRect+BeeExtension.h +79 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/CGRect+BeeExtension.m +288 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIColor+BeeExtension.h +65 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIColor+BeeExtension.m +161 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIFont+BeeExtension.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIFont+BeeExtension.m +137 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIImage+BeeExtension.h +56 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIImage+BeeExtension.m +218 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+BeeExtension.h +105 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+BeeExtension.m +556 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+BeeUISignal.h +53 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+BeeUISignal.m +104 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+HoldGesture.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+HoldGesture.m +170 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+PanGesture.h +54 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+PanGesture.m +166 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+SwipeGesture.h +54 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+SwipeGesture.m +184 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+TapGesture.h +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/View/Extension/UIView+TapGesture.m +275 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIBoard.h +212 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIBoard.m +1219 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIStack.h +111 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIStack.m +694 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIStackGroup.h +71 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_UIStackGroup.m +258 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_ViewController.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Bee_ViewController.m +36 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+BeeExtension.h +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+BeeExtension.m +151 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+BeeUISignal.h +53 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+BeeUISignal.m +92 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+UINavigationBar.h +72 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewController/Extension/UIViewController+UINavigationBar.m +175 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UICollection.h +59 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UICollection.m +249 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UILayout.h +199 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UILayout.m +1170 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UIQuery.h +113 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UIQuery.m +710 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UIStyle.h +66 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UIStyle.m +189 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplate.h +69 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplate.m +210 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateAndroid.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateAndroid.m +59 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateHTML.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateHTML.m +55 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateJSON.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateJSON.m +54 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateOmniGraffle.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateOmniGraffle.m +54 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateXML.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_UITemplateXML.m +438 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_ViewLayout.h +60 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Bee_ViewLayout.m +37 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/BeeUIQuery+BeeUIStyle.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/BeeUIQuery+BeeUIStyle.m +55 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/BeeUIStyle+BeeUIQuery.h +45 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/BeeUIStyle+BeeUIQuery.m +55 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIButton+BeeUIStyle.h +41 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIButton+BeeUIStyle.m +100 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIImageView+BeeUIStyle.h +41 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIImageView+BeeUIStyle.m +101 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UILabel+BeeUIStyle.h +41 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UILabel+BeeUIStyle.m +48 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UITextField+BeeUIStyle.h +41 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UITextField+BeeUIStyle.m +77 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UITextView+BeeUIStyle.h +41 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UITextView+BeeUIStyle.m +47 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUILayout.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUILayout.m +177 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUIQuery.h +44 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUIQuery.m +57 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUIStyle.h +50 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIView+BeeUIStyle.m +283 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUILayout.h +52 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUILayout.m +178 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUIQuery.h +44 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUIQuery.m +58 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUIStyle.h +44 -0
- data/test.xctemplate/libs/BeeFramework/MVC/ViewLayout/Extension/UIViewController+BeeUIStyle.m +57 -0
- metadata +226 -3
@@ -0,0 +1,300 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// Bee_NSArray+Slice.mm
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
#import "NSArray+BeeExtension.h"
|
35
|
+
|
36
|
+
#include <objc/runtime.h>
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@implementation NSArray(BeeExtension)
|
41
|
+
|
42
|
+
@dynamic APPEND;
|
43
|
+
|
44
|
+
- (NSMutableArrayAppendBlock)APPEND
|
45
|
+
{
|
46
|
+
NSMutableArrayAppendBlock block = ^ NSArray * ( id obj )
|
47
|
+
{
|
48
|
+
NSString * className = [[self class] description];
|
49
|
+
|
50
|
+
if ( [className isEqualToString:@"NSMutableArray"] )
|
51
|
+
{
|
52
|
+
[(NSMutableArray *)self addObject:obj];
|
53
|
+
return self;
|
54
|
+
}
|
55
|
+
else
|
56
|
+
{
|
57
|
+
NSMutableArray * array = [NSMutableArray arrayWithArray:self];
|
58
|
+
[array addObject:obj];
|
59
|
+
return array;
|
60
|
+
}
|
61
|
+
|
62
|
+
return self;
|
63
|
+
};
|
64
|
+
|
65
|
+
return [[block copy] autorelease];
|
66
|
+
}
|
67
|
+
|
68
|
+
- (NSArray *)head:(NSUInteger)count
|
69
|
+
{
|
70
|
+
if ( [self count] < count )
|
71
|
+
{
|
72
|
+
return self;
|
73
|
+
}
|
74
|
+
else
|
75
|
+
{
|
76
|
+
NSMutableArray * tempFeeds = [NSMutableArray array];
|
77
|
+
for ( NSObject * elem in self )
|
78
|
+
{
|
79
|
+
[tempFeeds addObject:elem];
|
80
|
+
if ( [tempFeeds count] >= count )
|
81
|
+
break;
|
82
|
+
}
|
83
|
+
return tempFeeds;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
- (NSArray *)tail:(NSUInteger)count
|
88
|
+
{
|
89
|
+
// if ( [self count] < count )
|
90
|
+
// {
|
91
|
+
// return self;
|
92
|
+
// }
|
93
|
+
// else
|
94
|
+
// {
|
95
|
+
// NSMutableArray * tempFeeds = [NSMutableArray array];
|
96
|
+
//
|
97
|
+
// for ( NSUInteger i = 0; i < count; i++ )
|
98
|
+
// {
|
99
|
+
// [tempFeeds insertObject:[self objectAtIndex:[self count] - i] atIndex:0];
|
100
|
+
// }
|
101
|
+
//
|
102
|
+
// return tempFeeds;
|
103
|
+
// }
|
104
|
+
|
105
|
+
// thansk @lancy, changed: NSArray tail: count
|
106
|
+
|
107
|
+
NSRange range = NSMakeRange( self.count - count, count );
|
108
|
+
return [self subarrayWithRange:range];
|
109
|
+
}
|
110
|
+
|
111
|
+
- (id)safeObjectAtIndex:(NSUInteger)index
|
112
|
+
{
|
113
|
+
if ( index >= self.count )
|
114
|
+
return nil;
|
115
|
+
|
116
|
+
return [self objectAtIndex:index];
|
117
|
+
}
|
118
|
+
|
119
|
+
@end
|
120
|
+
|
121
|
+
#pragma mark -
|
122
|
+
|
123
|
+
// No-ops for non-retaining objects.
|
124
|
+
static const void * __TTRetainNoOp( CFAllocatorRef allocator, const void * value ) { return value; }
|
125
|
+
static void __TTReleaseNoOp( CFAllocatorRef allocator, const void * value ) { }
|
126
|
+
|
127
|
+
#pragma mark -
|
128
|
+
|
129
|
+
@implementation NSMutableArray(BeeExtension)
|
130
|
+
|
131
|
+
+ (NSMutableArray *)nonRetainingArray // copy from Three20
|
132
|
+
{
|
133
|
+
CFArrayCallBacks callbacks = kCFTypeArrayCallBacks;
|
134
|
+
callbacks.retain = __TTRetainNoOp;
|
135
|
+
callbacks.release = __TTReleaseNoOp;
|
136
|
+
return (NSMutableArray *)CFArrayCreateMutable( nil, 0, &callbacks );
|
137
|
+
}
|
138
|
+
|
139
|
+
- (NSMutableArray *)pushHead:(NSObject *)obj
|
140
|
+
{
|
141
|
+
if ( obj )
|
142
|
+
{
|
143
|
+
[self insertObject:obj atIndex:0];
|
144
|
+
}
|
145
|
+
|
146
|
+
return self;
|
147
|
+
}
|
148
|
+
|
149
|
+
- (NSMutableArray *)pushHeadN:(NSArray *)all
|
150
|
+
{
|
151
|
+
if ( [all count] )
|
152
|
+
{
|
153
|
+
for ( NSUInteger i = [all count]; i > 0; --i )
|
154
|
+
{
|
155
|
+
[self insertObject:[all objectAtIndex:i - 1] atIndex:0];
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
return self;
|
160
|
+
}
|
161
|
+
|
162
|
+
- (NSMutableArray *)popTail
|
163
|
+
{
|
164
|
+
if ( [self count] > 0 )
|
165
|
+
{
|
166
|
+
[self removeObjectAtIndex:[self count] - 1];
|
167
|
+
}
|
168
|
+
|
169
|
+
return self;
|
170
|
+
}
|
171
|
+
|
172
|
+
- (NSMutableArray *)popTailN:(NSUInteger)n
|
173
|
+
{
|
174
|
+
if ( [self count] > 0 )
|
175
|
+
{
|
176
|
+
if ( n >= [self count] )
|
177
|
+
{
|
178
|
+
[self removeAllObjects];
|
179
|
+
}
|
180
|
+
else
|
181
|
+
{
|
182
|
+
NSRange range;
|
183
|
+
range.location = n;
|
184
|
+
range.length = [self count] - n;
|
185
|
+
|
186
|
+
[self removeObjectsInRange:range];
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
return self;
|
191
|
+
}
|
192
|
+
|
193
|
+
- (NSMutableArray *)pushTail:(NSObject *)obj
|
194
|
+
{
|
195
|
+
if ( obj )
|
196
|
+
{
|
197
|
+
[self addObject:obj];
|
198
|
+
}
|
199
|
+
|
200
|
+
return self;
|
201
|
+
}
|
202
|
+
|
203
|
+
- (NSMutableArray *)pushTailN:(NSArray *)all
|
204
|
+
{
|
205
|
+
if ( [all count] )
|
206
|
+
{
|
207
|
+
[self addObjectsFromArray:all];
|
208
|
+
}
|
209
|
+
|
210
|
+
return self;
|
211
|
+
}
|
212
|
+
|
213
|
+
- (NSMutableArray *)popHead
|
214
|
+
{
|
215
|
+
if ( [self count] )
|
216
|
+
{
|
217
|
+
[self removeLastObject];
|
218
|
+
}
|
219
|
+
|
220
|
+
return self;
|
221
|
+
}
|
222
|
+
|
223
|
+
- (NSMutableArray *)popHeadN:(NSUInteger)n
|
224
|
+
{
|
225
|
+
if ( [self count] > 0 )
|
226
|
+
{
|
227
|
+
if ( n >= [self count] )
|
228
|
+
{
|
229
|
+
[self removeAllObjects];
|
230
|
+
}
|
231
|
+
else
|
232
|
+
{
|
233
|
+
NSRange range;
|
234
|
+
range.location = 0;
|
235
|
+
range.length = n;
|
236
|
+
|
237
|
+
[self removeObjectsInRange:range];
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
return self;
|
242
|
+
}
|
243
|
+
|
244
|
+
- (NSMutableArray *)keepHead:(NSUInteger)n
|
245
|
+
{
|
246
|
+
if ( [self count] > n )
|
247
|
+
{
|
248
|
+
NSRange range;
|
249
|
+
range.location = n;
|
250
|
+
range.length = [self count] - n;
|
251
|
+
|
252
|
+
[self removeObjectsInRange:range];
|
253
|
+
}
|
254
|
+
|
255
|
+
return self;
|
256
|
+
}
|
257
|
+
|
258
|
+
- (NSMutableArray *)keepTail:(NSUInteger)n
|
259
|
+
{
|
260
|
+
if ( [self count] > n )
|
261
|
+
{
|
262
|
+
NSRange range;
|
263
|
+
range.location = 0;
|
264
|
+
range.length = [self count] - n;
|
265
|
+
|
266
|
+
[self removeObjectsInRange:range];
|
267
|
+
}
|
268
|
+
|
269
|
+
return self;
|
270
|
+
}
|
271
|
+
|
272
|
+
- (void)insertObjectNoRetain:(id)object atIndex:(NSUInteger)index
|
273
|
+
{
|
274
|
+
[self insertObject:object atIndex:index];
|
275
|
+
[object release];
|
276
|
+
}
|
277
|
+
|
278
|
+
- (void)addObjectNoRetain:(NSObject *)object
|
279
|
+
{
|
280
|
+
[self addObject:object];
|
281
|
+
[object release];
|
282
|
+
}
|
283
|
+
|
284
|
+
- (void)removeObjectNoRelease:(NSObject *)object
|
285
|
+
{
|
286
|
+
[object retain];
|
287
|
+
[self removeObject:object];
|
288
|
+
}
|
289
|
+
|
290
|
+
- (void)removeAllObjectsNoRelease
|
291
|
+
{
|
292
|
+
for ( NSObject * object in self )
|
293
|
+
{
|
294
|
+
[object retain];
|
295
|
+
}
|
296
|
+
|
297
|
+
[self removeAllObjects];
|
298
|
+
}
|
299
|
+
|
300
|
+
@end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// NSObject+BeeProperty.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
#pragma mark -
|
36
|
+
|
37
|
+
@interface NSData(BeeExtension)
|
38
|
+
|
39
|
+
@property (nonatomic, readonly) NSString * string;
|
40
|
+
|
41
|
+
@property (nonatomic, readonly) NSData * MD5;
|
42
|
+
@property (nonatomic, readonly) NSString * MD5String;
|
43
|
+
|
44
|
+
@end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// NSData+BeeExtension.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#import <CommonCrypto/CommonDigest.h>
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "NSData+BeeExtension.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@implementation NSData(BeeExtension)
|
41
|
+
|
42
|
+
@dynamic string;
|
43
|
+
@dynamic MD5;
|
44
|
+
@dynamic MD5String;
|
45
|
+
|
46
|
+
- (NSString *)string
|
47
|
+
{
|
48
|
+
return [[[NSString alloc] initWithData:self encoding:NSStringEncodingConversionAllowLossy] autorelease];
|
49
|
+
}
|
50
|
+
|
51
|
+
- (NSData *)MD5
|
52
|
+
{
|
53
|
+
unsigned char md5Result[CC_MD5_DIGEST_LENGTH + 1];
|
54
|
+
CC_MD5( [self bytes], [self length], md5Result );
|
55
|
+
|
56
|
+
NSMutableData * retData = [[[NSMutableData alloc] init] autorelease];
|
57
|
+
if ( nil == retData )
|
58
|
+
return nil;
|
59
|
+
|
60
|
+
[retData appendBytes:md5Result length:CC_MD5_DIGEST_LENGTH];
|
61
|
+
return retData;
|
62
|
+
}
|
63
|
+
|
64
|
+
- (NSString *)MD5String
|
65
|
+
{
|
66
|
+
NSData * value = [self MD5];
|
67
|
+
if ( value )
|
68
|
+
{
|
69
|
+
char tmp[16];
|
70
|
+
unsigned char * hex = (unsigned char *)malloc( 2048 + 1 );
|
71
|
+
unsigned char * bytes = (unsigned char *)[value bytes];
|
72
|
+
unsigned long length = [value length];
|
73
|
+
|
74
|
+
hex[0] = '\0';
|
75
|
+
|
76
|
+
for ( unsigned long i = 0; i < length; ++i )
|
77
|
+
{
|
78
|
+
sprintf( tmp, "%02X", bytes[i] );
|
79
|
+
strcat( (char *)hex, tmp );
|
80
|
+
}
|
81
|
+
|
82
|
+
NSString * result = [NSString stringWithUTF8String:(const char *)hex];
|
83
|
+
free( hex );
|
84
|
+
return result;
|
85
|
+
}
|
86
|
+
else
|
87
|
+
{
|
88
|
+
return nil;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
@end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// NSObject+BeeProperty.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
@interface NSDate(BeeExtension)
|
36
|
+
|
37
|
+
@property (nonatomic, readonly) NSString * string;
|
38
|
+
@property (nonatomic, readonly) NSNumber * number;
|
39
|
+
|
40
|
+
- (NSString *)stringWithDateFormat:(NSString *)format;
|
41
|
+
+ (NSUInteger)timeStamp;
|
42
|
+
+ (NSDate *)dateWithString:(NSString *)string;
|
43
|
+
|
44
|
+
@end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// NSObject+BeeProperty.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
#import "NSDate+BeeExtension.h"
|
36
|
+
#import "NSNumber+BeeExtension.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@implementation NSDate(BeeExtension)
|
41
|
+
|
42
|
+
@dynamic string;
|
43
|
+
@dynamic number;
|
44
|
+
|
45
|
+
- (NSString *)string
|
46
|
+
{
|
47
|
+
return self.description;
|
48
|
+
}
|
49
|
+
|
50
|
+
- (NSNumber *)number
|
51
|
+
{
|
52
|
+
return [NSNumber numberWithDouble:self.timeIntervalSince1970];
|
53
|
+
}
|
54
|
+
|
55
|
+
- (NSString *)stringWithDateFormat:(NSString *)format
|
56
|
+
{
|
57
|
+
#if 0
|
58
|
+
|
59
|
+
NSTimeInterval time = [self timeIntervalSince1970];
|
60
|
+
NSUInteger timeUint = (NSUInteger)time;
|
61
|
+
return [[NSNumber numberWithUnsignedInteger:timeUint] stringWithDateFormat:format];
|
62
|
+
|
63
|
+
#else
|
64
|
+
|
65
|
+
// thansk @lancy, changed: "NSDate depend on NSNumber" to "NSNumber depend on NSDate"
|
66
|
+
|
67
|
+
NSDateFormatter * dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
|
68
|
+
[dateFormatter setDateFormat:format];
|
69
|
+
return [dateFormatter stringFromDate:self];
|
70
|
+
|
71
|
+
#endif
|
72
|
+
}
|
73
|
+
|
74
|
+
+ (NSUInteger)timeStamp
|
75
|
+
{
|
76
|
+
NSTimeInterval time = [NSDate timeIntervalSinceReferenceDate];
|
77
|
+
return (NSUInteger)(time * 1000.0f);
|
78
|
+
}
|
79
|
+
|
80
|
+
+ (NSDate *)dateWithString:(NSString *)string
|
81
|
+
{
|
82
|
+
return nil;
|
83
|
+
}
|
84
|
+
|
85
|
+
@end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
//
|
2
|
+
// ______ ______ ______
|
3
|
+
// /\ __ \ /\ ___\ /\ ___\
|
4
|
+
// \ \ __< \ \ __\_ \ \ __\_
|
5
|
+
// \ \_____\ \ \_____\ \ \_____\
|
6
|
+
// \/_____/ \/_____/ \/_____/
|
7
|
+
//
|
8
|
+
// Copyright (c) 2012 BEE creators
|
9
|
+
// http://www.whatsbug.com
|
10
|
+
//
|
11
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
// copy of this software and associated documentation files (the "Software"),
|
13
|
+
// to deal in the Software without restriction, including without limitation
|
14
|
+
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
// and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
// Software is furnished to do so, subject to the following conditions:
|
17
|
+
//
|
18
|
+
// The above copyright notice and this permission notice shall be included in
|
19
|
+
// all copies or substantial portions of the Software.
|
20
|
+
//
|
21
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
27
|
+
// IN THE SOFTWARE.
|
28
|
+
//
|
29
|
+
//
|
30
|
+
// NSDictionary+BeeExtension.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
#pragma mark -
|
36
|
+
|
37
|
+
typedef NSDictionary * (^NSDictionaryAppendBlock)( NSString * key, id value );
|
38
|
+
|
39
|
+
#pragma mark -
|
40
|
+
|
41
|
+
@interface NSDictionary(BeeExtension)
|
42
|
+
|
43
|
+
@property (nonatomic, readonly) NSDictionaryAppendBlock APPEND;
|
44
|
+
|
45
|
+
- (NSObject *)objectOfAny:(NSArray *)array;
|
46
|
+
- (NSString *)stringOfAny:(NSArray *)array;
|
47
|
+
|
48
|
+
- (NSObject *)objectAtPath:(NSString *)path;
|
49
|
+
- (NSObject *)objectAtPath:(NSString *)path otherwise:(NSObject *)other;
|
50
|
+
|
51
|
+
- (NSObject *)objectAtPath:(NSString *)path separator:(NSString *)separator;
|
52
|
+
- (NSObject *)objectAtPath:(NSString *)path otherwise:(NSObject *)other separator:(NSString *)separator;
|
53
|
+
|
54
|
+
- (BOOL)boolAtPath:(NSString *)path;
|
55
|
+
- (BOOL)boolAtPath:(NSString *)path otherwise:(BOOL)other;
|
56
|
+
|
57
|
+
- (NSNumber *)numberAtPath:(NSString *)path;
|
58
|
+
- (NSNumber *)numberAtPath:(NSString *)path otherwise:(NSNumber *)other;
|
59
|
+
|
60
|
+
- (NSString *)stringAtPath:(NSString *)path;
|
61
|
+
- (NSString *)stringAtPath:(NSString *)path otherwise:(NSString *)other;
|
62
|
+
|
63
|
+
- (NSArray *)arrayAtPath:(NSString *)path;
|
64
|
+
- (NSArray *)arrayAtPath:(NSString *)path otherwise:(NSArray *)other;
|
65
|
+
|
66
|
+
- (NSMutableArray *)mutableArrayAtPath:(NSString *)path;
|
67
|
+
- (NSMutableArray *)mutableArrayAtPath:(NSString *)path otherwise:(NSMutableArray *)other;
|
68
|
+
|
69
|
+
- (NSDictionary *)dictAtPath:(NSString *)path;
|
70
|
+
- (NSDictionary *)dictAtPath:(NSString *)path otherwise:(NSDictionary *)other;
|
71
|
+
|
72
|
+
- (NSMutableDictionary *)mutableDictAtPath:(NSString *)path;
|
73
|
+
- (NSMutableDictionary *)mutableDictAtPath:(NSString *)path otherwise:(NSMutableDictionary *)other;
|
74
|
+
|
75
|
+
- (NSObject *)objectForClass:(Class)clazz;
|
76
|
+
|
77
|
+
@end
|
78
|
+
|
79
|
+
#pragma mark -
|
80
|
+
|
81
|
+
@interface NSMutableDictionary(BeeExtension)
|
82
|
+
|
83
|
+
- (BOOL)setObject:(NSObject *)obj atPath:(NSString *)path;
|
84
|
+
- (BOOL)setObject:(NSObject *)obj atPath:(NSString *)path separator:(NSString *)separator;
|
85
|
+
|
86
|
+
- (BOOL)setKeyValues:(id)first, ...;
|
87
|
+
|
88
|
+
+ (NSMutableDictionary *)keyValues:(id)first, ...;
|
89
|
+
|
90
|
+
@end
|