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,52 @@
|
|
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
|
+
// UIView+HoldGesture.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@interface UIView(HoldGesture)
|
41
|
+
|
42
|
+
@property (nonatomic, assign) BOOL holdable; // same as holdEnabled
|
43
|
+
@property (nonatomic, assign) BOOL holdEnabled;
|
44
|
+
@property (nonatomic, readonly) UILongPressGestureRecognizer * holdGesture;
|
45
|
+
|
46
|
+
AS_SIGNAL( HOLD_START ) // 长按开始
|
47
|
+
AS_SIGNAL( HOLD_STOP ) // 长按结束
|
48
|
+
AS_SIGNAL( HOLD_CANCELLED ) // 长按取消
|
49
|
+
|
50
|
+
@end
|
51
|
+
|
52
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,170 @@
|
|
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_UISignal.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
#import "Bee_Singleton.h"
|
38
|
+
#import "Bee_Log.h"
|
39
|
+
#import "Bee_Performance.h"
|
40
|
+
#import "UIView+BeeExtension.h"
|
41
|
+
#import "UIView+BeeUISignal.h"
|
42
|
+
#import "UIView+HoldGesture.h"
|
43
|
+
|
44
|
+
#import <objc/runtime.h>
|
45
|
+
|
46
|
+
#pragma mark -
|
47
|
+
|
48
|
+
@interface __LongPressGestureRecognizer : UILongPressGestureRecognizer
|
49
|
+
@end
|
50
|
+
|
51
|
+
#pragma mark -
|
52
|
+
|
53
|
+
@implementation __LongPressGestureRecognizer
|
54
|
+
|
55
|
+
- (id)initWithTarget:(id)target action:(SEL)action
|
56
|
+
{
|
57
|
+
self = [super initWithTarget:target action:action];
|
58
|
+
if ( self )
|
59
|
+
{
|
60
|
+
self.numberOfTapsRequired = 1;
|
61
|
+
self.numberOfTouchesRequired = 1;
|
62
|
+
self.cancelsTouchesInView = YES;
|
63
|
+
self.delaysTouchesBegan = YES;
|
64
|
+
self.delaysTouchesEnded = YES;
|
65
|
+
self.minimumPressDuration = 1.0f;
|
66
|
+
self.allowableMovement = 10;
|
67
|
+
}
|
68
|
+
return self;
|
69
|
+
}
|
70
|
+
|
71
|
+
- (void)dealloc
|
72
|
+
{
|
73
|
+
[super dealloc];
|
74
|
+
}
|
75
|
+
|
76
|
+
@end
|
77
|
+
|
78
|
+
#pragma mark -
|
79
|
+
|
80
|
+
@interface UIView(HoldGesturePrivate)
|
81
|
+
- (__LongPressGestureRecognizer *)getLongPressGesture;
|
82
|
+
@end
|
83
|
+
|
84
|
+
#pragma mark -
|
85
|
+
|
86
|
+
@implementation UIView(HoldGesture)
|
87
|
+
|
88
|
+
DEF_SIGNAL( HOLD_START ) // 长按开始
|
89
|
+
DEF_SIGNAL( HOLD_STOP ) // 长按结束
|
90
|
+
DEF_SIGNAL( HOLD_CANCELLED ) // 长按取消
|
91
|
+
|
92
|
+
@dynamic holdable; // same as holdEnabled
|
93
|
+
@dynamic holdEnabled;
|
94
|
+
@dynamic holdGesture;
|
95
|
+
|
96
|
+
- (__LongPressGestureRecognizer *)getLongPressGesture
|
97
|
+
{
|
98
|
+
__LongPressGestureRecognizer * pressGesture = nil;
|
99
|
+
|
100
|
+
for ( UIGestureRecognizer * gesture in self.gestureRecognizers )
|
101
|
+
{
|
102
|
+
if ( [gesture isKindOfClass:[__LongPressGestureRecognizer class]] )
|
103
|
+
{
|
104
|
+
pressGesture = (__LongPressGestureRecognizer *)gesture;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
if ( nil == pressGesture )
|
109
|
+
{
|
110
|
+
pressGesture = [[[__LongPressGestureRecognizer alloc] initWithTarget:self action:@selector(didLongPress:)] autorelease];
|
111
|
+
[self addGestureRecognizer:pressGesture];
|
112
|
+
}
|
113
|
+
|
114
|
+
return pressGesture;
|
115
|
+
}
|
116
|
+
|
117
|
+
- (void)didLongPress:(UILongPressGestureRecognizer *)pressGesture
|
118
|
+
{
|
119
|
+
if ( UIGestureRecognizerStateBegan == pressGesture.state )
|
120
|
+
{
|
121
|
+
[self sendUISignal:UIView.HOLD_START];
|
122
|
+
}
|
123
|
+
else if ( UIGestureRecognizerStateEnded == pressGesture.state )
|
124
|
+
{
|
125
|
+
[self sendUISignal:UIView.HOLD_STOP];
|
126
|
+
}
|
127
|
+
else if ( UIGestureRecognizerStateCancelled == pressGesture.state )
|
128
|
+
{
|
129
|
+
[self sendUISignal:UIView.HOLD_CANCELLED];
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
- (BOOL)holdable
|
134
|
+
{
|
135
|
+
return self.holdEnabled;
|
136
|
+
}
|
137
|
+
|
138
|
+
- (void)setHoldable:(BOOL)flag
|
139
|
+
{
|
140
|
+
self.holdEnabled = flag;
|
141
|
+
}
|
142
|
+
|
143
|
+
- (BOOL)holdEnabled
|
144
|
+
{
|
145
|
+
__LongPressGestureRecognizer * pressGesture = [self getLongPressGesture];
|
146
|
+
if ( pressGesture )
|
147
|
+
{
|
148
|
+
return pressGesture.enabled;
|
149
|
+
}
|
150
|
+
|
151
|
+
return NO;
|
152
|
+
}
|
153
|
+
|
154
|
+
- (void)setHoldEnabled:(BOOL)flag
|
155
|
+
{
|
156
|
+
__LongPressGestureRecognizer * pressGesture = [self getLongPressGesture];
|
157
|
+
if ( pressGesture )
|
158
|
+
{
|
159
|
+
pressGesture.enabled = flag;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
- (UILongPressGestureRecognizer *)holdGesture
|
164
|
+
{
|
165
|
+
return [self getLongPressGesture];
|
166
|
+
}
|
167
|
+
|
168
|
+
@end
|
169
|
+
|
170
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,54 @@
|
|
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
|
+
// UIView+PanGesture.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@interface UIView(PanGesture)
|
41
|
+
|
42
|
+
AS_SIGNAL( PAN_START ) // 左右滑动开始
|
43
|
+
AS_SIGNAL( PAN_STOP ) // 左右滑动结束
|
44
|
+
AS_SIGNAL( PAN_CHANGED ) // 左右滑动位置变化
|
45
|
+
AS_SIGNAL( PAN_CANCELLED ) // 左右滑动取消
|
46
|
+
|
47
|
+
@property (nonatomic, assign) BOOL pannable; // same as panEnabled
|
48
|
+
@property (nonatomic, assign) BOOL panEnabled;
|
49
|
+
@property (nonatomic, readonly) CGPoint panOffset;
|
50
|
+
@property (nonatomic, readonly) UIPanGestureRecognizer * panGesture;
|
51
|
+
|
52
|
+
@end
|
53
|
+
|
54
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,166 @@
|
|
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
|
+
// UIView+PanGesture.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
#import "Bee_Singleton.h"
|
38
|
+
#import "Bee_Log.h"
|
39
|
+
#import "Bee_Performance.h"
|
40
|
+
#import "UIView+BeeExtension.h"
|
41
|
+
#import "UIView+PanGesture.h"
|
42
|
+
#import "UIView+BeeUISignal.h"
|
43
|
+
|
44
|
+
#import <objc/runtime.h>
|
45
|
+
|
46
|
+
#pragma mark -
|
47
|
+
|
48
|
+
@interface __PanGestureRecognizer : UIPanGestureRecognizer
|
49
|
+
@end
|
50
|
+
@implementation __PanGestureRecognizer
|
51
|
+
@end
|
52
|
+
|
53
|
+
#pragma mark -
|
54
|
+
|
55
|
+
@interface UIView(PanGesturePrivate)
|
56
|
+
- (__PanGestureRecognizer *)getPanGesture;
|
57
|
+
- (void)didPan:(UIPanGestureRecognizer *)panGesture;
|
58
|
+
@end
|
59
|
+
|
60
|
+
#pragma mark -
|
61
|
+
|
62
|
+
@implementation UIView(PanGesture)
|
63
|
+
|
64
|
+
DEF_SIGNAL( PAN_START )
|
65
|
+
DEF_SIGNAL( PAN_STOP )
|
66
|
+
DEF_SIGNAL( PAN_CHANGED )
|
67
|
+
DEF_SIGNAL( PAN_CANCELLED )
|
68
|
+
|
69
|
+
@dynamic pannable;
|
70
|
+
@dynamic panEnabled;
|
71
|
+
@dynamic panOffset;
|
72
|
+
@dynamic panGesture;
|
73
|
+
|
74
|
+
- (__PanGestureRecognizer *)getPanGesture
|
75
|
+
{
|
76
|
+
__PanGestureRecognizer * panGesture = nil;
|
77
|
+
|
78
|
+
for ( UIGestureRecognizer * gesture in self.gestureRecognizers )
|
79
|
+
{
|
80
|
+
if ( [gesture isKindOfClass:[__PanGestureRecognizer class]] )
|
81
|
+
{
|
82
|
+
panGesture = (__PanGestureRecognizer *)gesture;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
if ( nil == panGesture )
|
87
|
+
{
|
88
|
+
panGesture = [[[__PanGestureRecognizer alloc] initWithTarget:self action:@selector(didPan:)] autorelease];
|
89
|
+
[self addGestureRecognizer:panGesture];
|
90
|
+
}
|
91
|
+
|
92
|
+
return panGesture;
|
93
|
+
}
|
94
|
+
|
95
|
+
- (void)didPan:(UIPanGestureRecognizer *)panGesture
|
96
|
+
{
|
97
|
+
CGPoint panOffset = [panGesture translationInView:self];
|
98
|
+
CC( @"panOffset = (%.0f, %.0f)", panOffset.x, panOffset.y );
|
99
|
+
|
100
|
+
if ( UIGestureRecognizerStateBegan == panGesture.state )
|
101
|
+
{
|
102
|
+
[self sendUISignal:UIView.PAN_START];
|
103
|
+
}
|
104
|
+
else if ( UIGestureRecognizerStateChanged == panGesture.state )
|
105
|
+
{
|
106
|
+
[self sendUISignal:UIView.PAN_CHANGED];
|
107
|
+
}
|
108
|
+
else if ( UIGestureRecognizerStateEnded == panGesture.state )
|
109
|
+
{
|
110
|
+
[self sendUISignal:UIView.PAN_STOP];
|
111
|
+
}
|
112
|
+
else if ( UIGestureRecognizerStateCancelled == panGesture.state )
|
113
|
+
{
|
114
|
+
[self sendUISignal:UIView.PAN_CANCELLED];
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
- (BOOL)pannable
|
119
|
+
{
|
120
|
+
return self.panEnabled;
|
121
|
+
}
|
122
|
+
|
123
|
+
- (void)setPannable:(BOOL)flag
|
124
|
+
{
|
125
|
+
self.panEnabled = flag;
|
126
|
+
}
|
127
|
+
|
128
|
+
- (BOOL)panEnabled
|
129
|
+
{
|
130
|
+
__PanGestureRecognizer * panGesture = [self getPanGesture];
|
131
|
+
if ( panGesture )
|
132
|
+
{
|
133
|
+
return panGesture.enabled;
|
134
|
+
}
|
135
|
+
|
136
|
+
return NO;
|
137
|
+
}
|
138
|
+
|
139
|
+
- (void)setPanEnabled:(BOOL)flag
|
140
|
+
{
|
141
|
+
__PanGestureRecognizer * panGesture = [self getPanGesture];
|
142
|
+
if ( panGesture )
|
143
|
+
{
|
144
|
+
panGesture.enabled = flag;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
- (CGPoint)panOffset
|
149
|
+
{
|
150
|
+
__PanGestureRecognizer * panGesture = [self getPanGesture];
|
151
|
+
if ( panGesture )
|
152
|
+
{
|
153
|
+
return [panGesture translationInView:self];
|
154
|
+
}
|
155
|
+
|
156
|
+
return CGPointZero;
|
157
|
+
}
|
158
|
+
|
159
|
+
- (UIPanGestureRecognizer *)panGesture
|
160
|
+
{
|
161
|
+
return [self getPanGesture];
|
162
|
+
}
|
163
|
+
|
164
|
+
@end
|
165
|
+
|
166
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,54 @@
|
|
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
|
+
// UIView+SwipeGesture.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
|
40
|
+
@interface UIView(SwipeGesture)
|
41
|
+
|
42
|
+
AS_SIGNAL( SWIPE_UP ) // 瞬间向上滑动
|
43
|
+
AS_SIGNAL( SWIPE_DOWN ) // 瞬间向下滑动
|
44
|
+
AS_SIGNAL( SWIPE_LEFT ) // 瞬间向左滑动
|
45
|
+
AS_SIGNAL( SWIPE_RIGHT ) // 瞬间向右滑动
|
46
|
+
|
47
|
+
@property (nonatomic, assign) BOOL swipeble; // same as swipeEnabled
|
48
|
+
@property (nonatomic, assign) BOOL swipeEnabled;
|
49
|
+
@property (nonatomic, assign) UISwipeGestureRecognizerDirection swipeDirection;
|
50
|
+
@property (nonatomic, readonly) UISwipeGestureRecognizer * swipeGesture;
|
51
|
+
|
52
|
+
@end
|
53
|
+
|
54
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,184 @@
|
|
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_UISignal.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UISignal.h"
|
37
|
+
#import "Bee_Singleton.h"
|
38
|
+
#import "Bee_Log.h"
|
39
|
+
#import "Bee_Performance.h"
|
40
|
+
#import "UIView+BeeExtension.h"
|
41
|
+
#import "UIView+BeeUISignal.h"
|
42
|
+
#import "UIView+SwipeGesture.h"
|
43
|
+
|
44
|
+
#import <objc/runtime.h>
|
45
|
+
|
46
|
+
#pragma mark -
|
47
|
+
|
48
|
+
@interface __SwipeGestureRecognizer : UISwipeGestureRecognizer
|
49
|
+
@end
|
50
|
+
@implementation __SwipeGestureRecognizer
|
51
|
+
@end
|
52
|
+
|
53
|
+
#pragma mark -
|
54
|
+
|
55
|
+
@interface UIView(SwipeGesturePrivate)
|
56
|
+
- (__SwipeGestureRecognizer *)getSwipeGesture;
|
57
|
+
- (void)didSwipe:(UISwipeGestureRecognizer *)swipeGesture;
|
58
|
+
@end
|
59
|
+
|
60
|
+
#pragma mark -
|
61
|
+
|
62
|
+
@implementation UIView(SwipeGesture)
|
63
|
+
|
64
|
+
DEF_SIGNAL( SWIPE_UP )
|
65
|
+
DEF_SIGNAL( SWIPE_DOWN )
|
66
|
+
DEF_SIGNAL( SWIPE_LEFT )
|
67
|
+
DEF_SIGNAL( SWIPE_RIGHT )
|
68
|
+
|
69
|
+
@dynamic swipeble;
|
70
|
+
@dynamic swipeEnabled;
|
71
|
+
@dynamic swipeDirection;
|
72
|
+
@dynamic swipeGesture;
|
73
|
+
|
74
|
+
- (__SwipeGestureRecognizer *)getSwipeGesture
|
75
|
+
{
|
76
|
+
__SwipeGestureRecognizer * swipeGesture = nil;
|
77
|
+
|
78
|
+
for ( UIGestureRecognizer * gesture in self.gestureRecognizers )
|
79
|
+
{
|
80
|
+
if ( [gesture isKindOfClass:[__SwipeGestureRecognizer class]] )
|
81
|
+
{
|
82
|
+
swipeGesture = (__SwipeGestureRecognizer *)gesture;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
if ( nil == swipeGesture )
|
87
|
+
{
|
88
|
+
swipeGesture = [[[__SwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipe:)] autorelease];
|
89
|
+
swipeGesture.numberOfTouchesRequired = 1;
|
90
|
+
[self addGestureRecognizer:swipeGesture];
|
91
|
+
}
|
92
|
+
|
93
|
+
return swipeGesture;
|
94
|
+
}
|
95
|
+
|
96
|
+
- (void)didSwipe:(UISwipeGestureRecognizer *)swipeGesture
|
97
|
+
{
|
98
|
+
if ( UIGestureRecognizerStateEnded == swipeGesture.state )
|
99
|
+
{
|
100
|
+
if ( UISwipeGestureRecognizerDirectionUp == swipeGesture.direction )
|
101
|
+
{
|
102
|
+
CC( @"swipe up" );
|
103
|
+
|
104
|
+
[self sendUISignal:UIView.SWIPE_UP];
|
105
|
+
}
|
106
|
+
else if ( UISwipeGestureRecognizerDirectionDown == swipeGesture.direction )
|
107
|
+
{
|
108
|
+
CC( @"swipe down" );
|
109
|
+
|
110
|
+
[self sendUISignal:UIView.SWIPE_DOWN];
|
111
|
+
}
|
112
|
+
else if ( UISwipeGestureRecognizerDirectionLeft == swipeGesture.direction )
|
113
|
+
{
|
114
|
+
CC( @"swipe left" );
|
115
|
+
|
116
|
+
[self sendUISignal:UIView.SWIPE_LEFT];
|
117
|
+
}
|
118
|
+
else if ( UISwipeGestureRecognizerDirectionRight == swipeGesture.direction )
|
119
|
+
{
|
120
|
+
CC( @"swipe right" );
|
121
|
+
|
122
|
+
[self sendUISignal:UIView.SWIPE_RIGHT];
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
- (BOOL)swipeble
|
128
|
+
{
|
129
|
+
return self.swipeEnabled;
|
130
|
+
}
|
131
|
+
|
132
|
+
- (void)setSwipeble:(BOOL)flag
|
133
|
+
{
|
134
|
+
self.swipeEnabled = flag;
|
135
|
+
}
|
136
|
+
|
137
|
+
- (BOOL)swipeEnabled
|
138
|
+
{
|
139
|
+
__SwipeGestureRecognizer * swipeGesture = [self getSwipeGesture];
|
140
|
+
if ( swipeGesture )
|
141
|
+
{
|
142
|
+
return swipeGesture.enabled;
|
143
|
+
}
|
144
|
+
|
145
|
+
return NO;
|
146
|
+
}
|
147
|
+
|
148
|
+
- (void)setSwipeEnabled:(BOOL)flag
|
149
|
+
{
|
150
|
+
__SwipeGestureRecognizer * swipeGesture = [self getSwipeGesture];
|
151
|
+
if ( swipeGesture )
|
152
|
+
{
|
153
|
+
swipeGesture.enabled = flag;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
- (UISwipeGestureRecognizerDirection)direction
|
158
|
+
{
|
159
|
+
__SwipeGestureRecognizer * swipeGesture = [self getSwipeGesture];
|
160
|
+
if ( swipeGesture )
|
161
|
+
{
|
162
|
+
return swipeGesture.direction;
|
163
|
+
}
|
164
|
+
|
165
|
+
return 0;
|
166
|
+
}
|
167
|
+
|
168
|
+
- (void)setSwipeDirection:(UISwipeGestureRecognizerDirection)direction
|
169
|
+
{
|
170
|
+
__SwipeGestureRecognizer * swipeGesture = [self getSwipeGesture];
|
171
|
+
if ( swipeGesture )
|
172
|
+
{
|
173
|
+
swipeGesture.direction = direction;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
- (UISwipeGestureRecognizer *)swipeGesture
|
178
|
+
{
|
179
|
+
return [self getSwipeGesture];
|
180
|
+
}
|
181
|
+
|
182
|
+
@end
|
183
|
+
|
184
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|