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,116 @@
|
|
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+BeeJSON.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
#import "Bee_Runtime.h"
|
35
|
+
#import "NSObject+BeeJSON.h"
|
36
|
+
#import "NSObject+BeeTypeConversion.h"
|
37
|
+
#import "JSONKit.h"
|
38
|
+
#include <objc/runtime.h>
|
39
|
+
|
40
|
+
#pragma mark -
|
41
|
+
|
42
|
+
@implementation NSObject(BeeJSON)
|
43
|
+
|
44
|
+
- (NSData *)JSONData
|
45
|
+
{
|
46
|
+
return [[self JSONDictionary] JSONData];
|
47
|
+
}
|
48
|
+
|
49
|
+
- (NSString *)JSONString
|
50
|
+
{
|
51
|
+
return [[self JSONDictionary] JSONString];
|
52
|
+
}
|
53
|
+
|
54
|
+
- (NSDictionary *)JSONDictionary
|
55
|
+
{
|
56
|
+
NSMutableDictionary * result = [NSMutableDictionary dictionary];
|
57
|
+
|
58
|
+
NSUInteger propertyCount = 0;
|
59
|
+
objc_property_t * properties = class_copyPropertyList( [self class], &propertyCount );
|
60
|
+
|
61
|
+
for ( NSUInteger i = 0; i < propertyCount; i++ )
|
62
|
+
{
|
63
|
+
const char * name = property_getName(properties[i]);
|
64
|
+
const char * attr = property_getAttributes(properties[i]);
|
65
|
+
|
66
|
+
NSString * propertyName = [NSString stringWithCString:name encoding:NSUTF8StringEncoding];
|
67
|
+
NSUInteger propertyType = [BeeTypeEncoding typeOf:attr];
|
68
|
+
|
69
|
+
NSObject * obj = [self valueForKey:propertyName];
|
70
|
+
if ( obj )
|
71
|
+
{
|
72
|
+
if ( BeeTypeEncoding.NSNUMBER == propertyType )
|
73
|
+
{
|
74
|
+
[result setObject:obj forKey:propertyName];
|
75
|
+
}
|
76
|
+
else if ( BeeTypeEncoding.NSSTRING == propertyType )
|
77
|
+
{
|
78
|
+
[result setObject:obj forKey:propertyName];
|
79
|
+
}
|
80
|
+
else if ( BeeTypeEncoding.NSARRAY == propertyType )
|
81
|
+
{
|
82
|
+
[result setObject:obj forKey:propertyName];
|
83
|
+
}
|
84
|
+
else if ( BeeTypeEncoding.NSDICTIONARY == propertyType )
|
85
|
+
{
|
86
|
+
[result setObject:obj forKey:propertyName];
|
87
|
+
}
|
88
|
+
else if ( BeeTypeEncoding.NSDATE == propertyType )
|
89
|
+
{
|
90
|
+
[result setObject:obj forKey:propertyName];
|
91
|
+
}
|
92
|
+
else
|
93
|
+
{
|
94
|
+
obj = [obj JSONDictionary];
|
95
|
+
if ( obj )
|
96
|
+
{
|
97
|
+
[result setObject:obj forKey:propertyName];
|
98
|
+
}
|
99
|
+
else
|
100
|
+
{
|
101
|
+
[result setObject:[NSDictionary dictionary] forKey:propertyName];
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
else
|
106
|
+
{
|
107
|
+
[result setObject:[NSNull null] forKey:propertyName];
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
free( properties );
|
112
|
+
|
113
|
+
return result;
|
114
|
+
}
|
115
|
+
|
116
|
+
@end
|
@@ -0,0 +1,66 @@
|
|
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+BeeNotification.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
#import "NSObject+BeeProperty.h"
|
35
|
+
|
36
|
+
#pragma mark -
|
37
|
+
|
38
|
+
#define AS_NOTIFICATION( __name ) AS_STATIC_PROPERTY( __name )
|
39
|
+
#define DEF_NOTIFICATION( __name ) DEF_STATIC_PROPERTY3( __name, @"notify", [self description] )
|
40
|
+
|
41
|
+
#pragma mark -
|
42
|
+
|
43
|
+
@interface NSNotification(BeeNotification)
|
44
|
+
|
45
|
+
- (BOOL)is:(NSString *)name;
|
46
|
+
- (BOOL)isKindOf:(NSString *)prefix;
|
47
|
+
|
48
|
+
@end
|
49
|
+
|
50
|
+
#pragma mark -
|
51
|
+
|
52
|
+
@interface NSObject(BeeNotification)
|
53
|
+
|
54
|
+
+ (NSString *)NOTIFICATION;
|
55
|
+
+ (NSString *)NOTIFICATION_TYPE;
|
56
|
+
|
57
|
+
- (void)handleNotification:(NSNotification *)notification;
|
58
|
+
|
59
|
+
- (void)observeNotification:(NSString *)name;
|
60
|
+
- (void)unobserveNotification:(NSString *)name;
|
61
|
+
- (void)unobserveAllNotifications;
|
62
|
+
|
63
|
+
- (BOOL)postNotification:(NSString *)name;
|
64
|
+
- (BOOL)postNotification:(NSString *)name withObject:(NSObject *)object;
|
65
|
+
|
66
|
+
@end
|
@@ -0,0 +1,150 @@
|
|
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+BeeNotification.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
#import "Bee_Log.h"
|
35
|
+
#import "NSObject+BeeNotification.h"
|
36
|
+
|
37
|
+
#pragma mark -
|
38
|
+
|
39
|
+
@implementation NSNotification(BeeNotification)
|
40
|
+
|
41
|
+
- (BOOL)is:(NSString *)name
|
42
|
+
{
|
43
|
+
return [self.name isEqualToString:name];
|
44
|
+
}
|
45
|
+
|
46
|
+
- (BOOL)isKindOf:(NSString *)prefix
|
47
|
+
{
|
48
|
+
return [self.name hasPrefix:prefix];
|
49
|
+
}
|
50
|
+
|
51
|
+
@end
|
52
|
+
|
53
|
+
#pragma mark -
|
54
|
+
|
55
|
+
@implementation NSObject(BeeNotification)
|
56
|
+
|
57
|
+
+ (NSString *)NOTIFICATION
|
58
|
+
{
|
59
|
+
return [self NOTIFICATION_TYPE];
|
60
|
+
}
|
61
|
+
|
62
|
+
+ (NSString *)NOTIFICATION_TYPE
|
63
|
+
{
|
64
|
+
return [NSString stringWithFormat:@"notify.%@.", [self description]];
|
65
|
+
}
|
66
|
+
|
67
|
+
- (void)handleNotification:(NSNotification *)notification
|
68
|
+
{
|
69
|
+
}
|
70
|
+
|
71
|
+
- (void)observeNotification:(NSString *)name
|
72
|
+
{
|
73
|
+
NSArray * array = [name componentsSeparatedByString:@"."];
|
74
|
+
if ( array && array.count > 1 )
|
75
|
+
{
|
76
|
+
// NSString * prefix = (NSString *)[array objectAtIndex:0];
|
77
|
+
NSString * clazz = (NSString *)[array objectAtIndex:1];
|
78
|
+
NSString * name = (NSString *)[array objectAtIndex:2];
|
79
|
+
|
80
|
+
#if defined(__BEE_SELECTOR_STYLE2__) && __BEE_SELECTOR_STYLE2__
|
81
|
+
{
|
82
|
+
NSString * selectorName;
|
83
|
+
SEL selector;
|
84
|
+
|
85
|
+
selectorName = [NSString stringWithFormat:@"handleNotification_%@_%@:", clazz, name];
|
86
|
+
selector = NSSelectorFromString(selectorName);
|
87
|
+
|
88
|
+
if ( [self respondsToSelector:selector] )
|
89
|
+
{
|
90
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
91
|
+
selector:selector
|
92
|
+
name:name
|
93
|
+
object:nil];
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
|
97
|
+
selectorName = [NSString stringWithFormat:@"handleNotification_%@:", clazz];
|
98
|
+
selector = NSSelectorFromString(selectorName);
|
99
|
+
|
100
|
+
if ( [self respondsToSelector:selector] )
|
101
|
+
{
|
102
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
103
|
+
selector:selector
|
104
|
+
name:name
|
105
|
+
object:nil];
|
106
|
+
return;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
#endif // #if defined(__BEE_SMART_SELECTOR2__) && __BEE_SMART_SELECTOR2__
|
110
|
+
|
111
|
+
#if defined(__BEE_SELECTOR_STYLE1__) && __BEE_SELECTOR_STYLE1__
|
112
|
+
{
|
113
|
+
// TODO:
|
114
|
+
}
|
115
|
+
#endif // #if defined(__BEE_SMART_SELECTOR1__) && __BEE_SMART_SELECTOR1__
|
116
|
+
}
|
117
|
+
|
118
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
119
|
+
selector:@selector(handleNotification:)
|
120
|
+
name:name
|
121
|
+
object:nil];
|
122
|
+
}
|
123
|
+
|
124
|
+
- (void)unobserveNotification:(NSString *)name
|
125
|
+
{
|
126
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self
|
127
|
+
name:name
|
128
|
+
object:nil];
|
129
|
+
}
|
130
|
+
|
131
|
+
- (void)unobserveAllNotifications
|
132
|
+
{
|
133
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
134
|
+
}
|
135
|
+
|
136
|
+
- (BOOL)postNotification:(NSString *)name
|
137
|
+
{
|
138
|
+
CC( @"notification, %@", name );
|
139
|
+
|
140
|
+
[[NSNotificationCenter defaultCenter] postNotificationName:name object:nil];
|
141
|
+
return YES;
|
142
|
+
}
|
143
|
+
|
144
|
+
- (BOOL)postNotification:(NSString *)name withObject:(NSObject *)object
|
145
|
+
{
|
146
|
+
[[NSNotificationCenter defaultCenter] postNotificationName:name object:object];
|
147
|
+
return YES;
|
148
|
+
}
|
149
|
+
|
150
|
+
@end
|
@@ -0,0 +1,210 @@
|
|
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
|
+
#undef AS_STATIC_PROPERTY
|
38
|
+
#define AS_STATIC_PROPERTY( __name ) \
|
39
|
+
@property (nonatomic, readonly) NSString * __name; \
|
40
|
+
+ (NSString *)__name;
|
41
|
+
|
42
|
+
#if __has_feature(objc_arc)
|
43
|
+
|
44
|
+
#undef DEF_STATIC_PROPERTY
|
45
|
+
#define DEF_STATIC_PROPERTY( __name ) \
|
46
|
+
@dynamic __name; \
|
47
|
+
- (NSString *)__name \
|
48
|
+
{ \
|
49
|
+
return (NSString *)[[self class] __name]; \
|
50
|
+
} \
|
51
|
+
+ (NSString *)__name \
|
52
|
+
{ \
|
53
|
+
static NSString * __local = nil; \
|
54
|
+
if ( nil == __local ) \
|
55
|
+
{ \
|
56
|
+
__local = [NSString stringWithFormat:@"%s", #__name]; \
|
57
|
+
} \
|
58
|
+
return __local; \
|
59
|
+
}
|
60
|
+
|
61
|
+
#else
|
62
|
+
|
63
|
+
#undef DEF_STATIC_PROPERTY
|
64
|
+
#define DEF_STATIC_PROPERTY( __name ) \
|
65
|
+
@dynamic __name; \
|
66
|
+
- (NSString *)__name \
|
67
|
+
{ \
|
68
|
+
return (NSString *)[[self class] __name]; \
|
69
|
+
} \
|
70
|
+
+ (NSString *)__name \
|
71
|
+
{ \
|
72
|
+
static NSString * __local = nil; \
|
73
|
+
if ( nil == __local ) \
|
74
|
+
{ \
|
75
|
+
__local = [[NSString stringWithFormat:@"%s", #__name] retain]; \
|
76
|
+
} \
|
77
|
+
return __local; \
|
78
|
+
}
|
79
|
+
|
80
|
+
#endif
|
81
|
+
|
82
|
+
#if __has_feature(objc_arc)
|
83
|
+
|
84
|
+
#undef DEF_STATIC_PROPERTY2
|
85
|
+
#define DEF_STATIC_PROPERTY2( __name, __prefix ) \
|
86
|
+
@dynamic __name; \
|
87
|
+
- (NSString *)__name \
|
88
|
+
{ \
|
89
|
+
return (NSString *)[[self class] __name]; \
|
90
|
+
} \
|
91
|
+
+ (NSString *)__name \
|
92
|
+
{ \
|
93
|
+
static NSString * __local = nil; \
|
94
|
+
if ( nil == __local ) \
|
95
|
+
{ \
|
96
|
+
__local = [NSString stringWithFormat:@"%@.%s", __prefix, #__name]; \
|
97
|
+
} \
|
98
|
+
return __local; \
|
99
|
+
}
|
100
|
+
|
101
|
+
#else
|
102
|
+
|
103
|
+
#undef DEF_STATIC_PROPERTY2
|
104
|
+
#define DEF_STATIC_PROPERTY2( __name, __prefix ) \
|
105
|
+
@dynamic __name; \
|
106
|
+
- (NSString *)__name \
|
107
|
+
{ \
|
108
|
+
return (NSString *)[[self class] __name]; \
|
109
|
+
} \
|
110
|
+
+ (NSString *)__name \
|
111
|
+
{ \
|
112
|
+
static NSString * __local = nil; \
|
113
|
+
if ( nil == __local ) \
|
114
|
+
{ \
|
115
|
+
__local = [[NSString stringWithFormat:@"%@.%s", __prefix, #__name] retain]; \
|
116
|
+
} \
|
117
|
+
return __local; \
|
118
|
+
}
|
119
|
+
|
120
|
+
#endif
|
121
|
+
|
122
|
+
#if __has_feature(objc_arc)
|
123
|
+
|
124
|
+
#undef DEF_STATIC_PROPERTY3
|
125
|
+
#define DEF_STATIC_PROPERTY3( __name, __prefix, __prefix2 ) \
|
126
|
+
@dynamic __name; \
|
127
|
+
- (NSString *)__name \
|
128
|
+
{ \
|
129
|
+
return (NSString *)[[self class] __name]; \
|
130
|
+
} \
|
131
|
+
+ (NSString *)__name \
|
132
|
+
{ \
|
133
|
+
static NSString * __local = nil; \
|
134
|
+
if ( nil == __local ) \
|
135
|
+
{ \
|
136
|
+
__local = [NSString stringWithFormat:@"%@.%@.%s", __prefix, __prefix2, #__name]; \
|
137
|
+
} \
|
138
|
+
return __local; \
|
139
|
+
}
|
140
|
+
|
141
|
+
#else
|
142
|
+
|
143
|
+
#undef DEF_STATIC_PROPERTY3
|
144
|
+
#define DEF_STATIC_PROPERTY3( __name, __prefix, __prefix2 ) \
|
145
|
+
@dynamic __name; \
|
146
|
+
- (NSString *)__name \
|
147
|
+
{ \
|
148
|
+
return (NSString *)[[self class] __name]; \
|
149
|
+
} \
|
150
|
+
+ (NSString *)__name \
|
151
|
+
{ \
|
152
|
+
static NSString * __local = nil; \
|
153
|
+
if ( nil == __local ) \
|
154
|
+
{ \
|
155
|
+
__local = [[NSString stringWithFormat:@"%@.%@.%s", __prefix, __prefix2, #__name] retain]; \
|
156
|
+
} \
|
157
|
+
return __local; \
|
158
|
+
}
|
159
|
+
|
160
|
+
#endif
|
161
|
+
|
162
|
+
#pragma mark -
|
163
|
+
|
164
|
+
#undef AS_STATIC_PROPERTY_INT
|
165
|
+
#define AS_STATIC_PROPERTY_INT( __name ) \
|
166
|
+
@property (nonatomic, readonly) NSInteger __name; \
|
167
|
+
+ (NSInteger)__name;
|
168
|
+
|
169
|
+
#undef DEF_STATIC_PROPERTY_INT
|
170
|
+
#define DEF_STATIC_PROPERTY_INT( __name, __value ) \
|
171
|
+
@dynamic __name; \
|
172
|
+
- (NSInteger)__name \
|
173
|
+
{ \
|
174
|
+
return (NSInteger)[[self class] __name]; \
|
175
|
+
} \
|
176
|
+
+ (NSInteger)__name \
|
177
|
+
{ \
|
178
|
+
return __value; \
|
179
|
+
}
|
180
|
+
|
181
|
+
#undef AS_INT
|
182
|
+
#define AS_INT AS_STATIC_PROPERTY_INT
|
183
|
+
|
184
|
+
#undef DEF_INT
|
185
|
+
#define DEF_INT DEF_STATIC_PROPERTY_INT
|
186
|
+
|
187
|
+
#pragma mark -
|
188
|
+
|
189
|
+
#undef AS_STATIC_PROPERTY_STRING
|
190
|
+
#define AS_STATIC_PROPERTY_STRING( __name ) \
|
191
|
+
@property (nonatomic, readonly) NSString * __name; \
|
192
|
+
+ (NSString *)__name;
|
193
|
+
|
194
|
+
#undef DEF_STATIC_PROPERTY_STRING
|
195
|
+
#define DEF_STATIC_PROPERTY_STRING( __name, __value ) \
|
196
|
+
@dynamic __name; \
|
197
|
+
- (NSString *)__name \
|
198
|
+
{ \
|
199
|
+
return [[self class] __name]; \
|
200
|
+
} \
|
201
|
+
+ (NSString *)__name \
|
202
|
+
{ \
|
203
|
+
return __value; \
|
204
|
+
}
|
205
|
+
|
206
|
+
#undef AS_STRING
|
207
|
+
#define AS_STRING AS_STATIC_PROPERTY_STRING
|
208
|
+
|
209
|
+
#undef DEF_STRING
|
210
|
+
#define DEF_STRING DEF_STATIC_PROPERTY_STRING
|
@@ -0,0 +1,34 @@
|
|
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
|
+
#import "NSObject+BeeProperty.h"
|
@@ -0,0 +1,41 @@
|
|
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+BeeTicker.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
#pragma mark -
|
36
|
+
|
37
|
+
@interface NSObject(BeeTicker)
|
38
|
+
- (void)observeTick;
|
39
|
+
- (void)unobserveTick;
|
40
|
+
- (void)handleTick:(NSTimeInterval)elapsed;
|
41
|
+
@end
|