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,152 @@
|
|
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_UIActivityIndicatorView.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UIActivityIndicatorView.h"
|
37
|
+
#import "Bee_UISignal.h"
|
38
|
+
#import "Bee_SystemInfo.h"
|
39
|
+
#import "UIView+BeeExtension.h"
|
40
|
+
#import "UIView+BeeUISignal.h"
|
41
|
+
|
42
|
+
#pragma mark -
|
43
|
+
|
44
|
+
@interface BeeUIActivityIndicatorView(Private)
|
45
|
+
- (void)initSelf;
|
46
|
+
@end
|
47
|
+
|
48
|
+
@implementation BeeUIActivityIndicatorView
|
49
|
+
|
50
|
+
DEF_SIGNAL( WILL_START )
|
51
|
+
DEF_SIGNAL( DID_START )
|
52
|
+
DEF_SIGNAL( WILL_STOP )
|
53
|
+
DEF_SIGNAL( DID_STOP )
|
54
|
+
|
55
|
+
+ (BeeUIActivityIndicatorView *)spawn
|
56
|
+
{
|
57
|
+
return [[[BeeUIActivityIndicatorView alloc] init] autorelease];
|
58
|
+
}
|
59
|
+
|
60
|
+
+ (BeeUIActivityIndicatorView *)spawn:(NSString *)tagString
|
61
|
+
{
|
62
|
+
BeeUIActivityIndicatorView * view = [[[BeeUIActivityIndicatorView alloc] init] autorelease];
|
63
|
+
view.tagString = tagString;
|
64
|
+
return view;
|
65
|
+
}
|
66
|
+
|
67
|
+
- (id)init
|
68
|
+
{
|
69
|
+
self = [super initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
|
70
|
+
if ( self )
|
71
|
+
{
|
72
|
+
[self initSelf];
|
73
|
+
}
|
74
|
+
return self;
|
75
|
+
}
|
76
|
+
|
77
|
+
- (id)initWithActivityIndicatorStyle:(UIActivityIndicatorViewStyle)style
|
78
|
+
{
|
79
|
+
self = [super initWithActivityIndicatorStyle:style];
|
80
|
+
if ( self )
|
81
|
+
{
|
82
|
+
[self initSelf];
|
83
|
+
}
|
84
|
+
return self;
|
85
|
+
}
|
86
|
+
|
87
|
+
- (id)initWithFrame:(CGRect)frame
|
88
|
+
{
|
89
|
+
self = [super initWithFrame:frame];
|
90
|
+
if ( self )
|
91
|
+
{
|
92
|
+
[self initSelf];
|
93
|
+
}
|
94
|
+
return self;
|
95
|
+
}
|
96
|
+
|
97
|
+
- (void)initSelf
|
98
|
+
{
|
99
|
+
self.hidden = YES;
|
100
|
+
self.alpha = 0.0f;
|
101
|
+
|
102
|
+
self.hidesWhenStopped = YES;
|
103
|
+
self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;
|
104
|
+
self.backgroundColor = [UIColor clearColor];
|
105
|
+
self.userInteractionEnabled = NO;
|
106
|
+
|
107
|
+
#if defined(__IPHONE_5_0)
|
108
|
+
if ( IOS5_OR_LATER )
|
109
|
+
{
|
110
|
+
self.color = [UIColor whiteColor];
|
111
|
+
}
|
112
|
+
#endif
|
113
|
+
}
|
114
|
+
|
115
|
+
- (void)startAnimating
|
116
|
+
{
|
117
|
+
if ( self.isAnimating )
|
118
|
+
return;
|
119
|
+
|
120
|
+
[self sendUISignal:BeeUIActivityIndicatorView.WILL_START];
|
121
|
+
|
122
|
+
self.hidden = NO;
|
123
|
+
self.alpha = 1.0f;
|
124
|
+
|
125
|
+
[super startAnimating];
|
126
|
+
|
127
|
+
[self sendUISignal:BeeUIActivityIndicatorView.DID_START];
|
128
|
+
}
|
129
|
+
|
130
|
+
- (void)stopAnimating
|
131
|
+
{
|
132
|
+
if ( NO == self.isAnimating )
|
133
|
+
return;
|
134
|
+
|
135
|
+
[self sendUISignal:BeeUIActivityIndicatorView.WILL_STOP];
|
136
|
+
|
137
|
+
self.hidden = YES;
|
138
|
+
self.alpha = 0.0f;
|
139
|
+
|
140
|
+
[super stopAnimating];
|
141
|
+
|
142
|
+
[self sendUISignal:BeeUIActivityIndicatorView.DID_STOP];
|
143
|
+
}
|
144
|
+
|
145
|
+
- (void)dealloc
|
146
|
+
{
|
147
|
+
[super dealloc];
|
148
|
+
}
|
149
|
+
|
150
|
+
@end
|
151
|
+
|
152
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,73 @@
|
|
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_UIAlertView.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 BeeUIAlertView : UIAlertView<UIAlertViewDelegate>
|
41
|
+
{
|
42
|
+
UIView * _parentView;
|
43
|
+
NSMutableArray * _actions;
|
44
|
+
NSObject * _userData;
|
45
|
+
}
|
46
|
+
|
47
|
+
AS_SIGNAL( WILL_PRESENT ) // 将要显示
|
48
|
+
AS_SIGNAL( DID_PRESENT ) // 已经显示
|
49
|
+
AS_SIGNAL( WILL_DISMISS ) // 将要隐藏
|
50
|
+
AS_SIGNAL( DID_DISMISS ) // 已经隐藏
|
51
|
+
|
52
|
+
@property (nonatomic, assign) UIView * parentView;
|
53
|
+
@property (nonatomic, retain) NSObject * userData;
|
54
|
+
|
55
|
+
+ (BeeUIAlertView *)showMessage:(NSString *)message cancelTitle:(NSString *)title;
|
56
|
+
|
57
|
+
+ (BeeUIAlertView *)spawn;
|
58
|
+
+ (BeeUIAlertView *)spawn:(NSString *)tagString;
|
59
|
+
|
60
|
+
- (void)showInView:(UIView *)view;
|
61
|
+
- (void)showInViewController:(UIViewController *)controller; // same as presentForController:
|
62
|
+
|
63
|
+
- (void)presentForController:(UIViewController *)controller;
|
64
|
+
- (void)dismissAnimated:(BOOL)animated;
|
65
|
+
|
66
|
+
- (void)addCancelTitle:(NSString *)title;
|
67
|
+
- (void)addCancelTitle:(NSString *)title signal:(NSString *)signal object:(NSDictionary *)object;
|
68
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal;
|
69
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal object:(NSDictionary *)object;
|
70
|
+
|
71
|
+
@end
|
72
|
+
|
73
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,234 @@
|
|
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_UIAlertView.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UIAlertView.h"
|
37
|
+
#import "Bee_UISignal.h"
|
38
|
+
#import "UIView+BeeExtension.h"
|
39
|
+
#import "UIView+BeeUISignal.h"
|
40
|
+
#import "UIView+BeeUISignal.h"
|
41
|
+
|
42
|
+
#pragma mark -
|
43
|
+
|
44
|
+
@implementation BeeUIAlertView
|
45
|
+
|
46
|
+
DEF_SIGNAL( WILL_PRESENT )
|
47
|
+
DEF_SIGNAL( DID_PRESENT )
|
48
|
+
DEF_SIGNAL( WILL_DISMISS )
|
49
|
+
DEF_SIGNAL( DID_DISMISS )
|
50
|
+
|
51
|
+
@synthesize parentView = _parentView;
|
52
|
+
@synthesize userData = _userData;
|
53
|
+
|
54
|
+
+ (BeeUIAlertView *)showMessage:(NSString *)message cancelTitle:(NSString *)title
|
55
|
+
{
|
56
|
+
BeeUIAlertView * alert = [BeeUIAlertView spawn];
|
57
|
+
[alert setMessage:message];
|
58
|
+
[alert addCancelTitle:title];
|
59
|
+
[alert show];
|
60
|
+
return alert;
|
61
|
+
}
|
62
|
+
|
63
|
+
+ (BeeUIAlertView *)spawn
|
64
|
+
{
|
65
|
+
return [[[BeeUIAlertView alloc] init] autorelease];
|
66
|
+
}
|
67
|
+
|
68
|
+
+ (BeeUIAlertView *)spawn:(NSString *)tagString
|
69
|
+
{
|
70
|
+
BeeUIAlertView * view = [[[BeeUIAlertView alloc] init] autorelease];
|
71
|
+
view.tagString = tagString;
|
72
|
+
return view;
|
73
|
+
}
|
74
|
+
|
75
|
+
- (id)init
|
76
|
+
{
|
77
|
+
self = [super init];
|
78
|
+
if ( self )
|
79
|
+
{
|
80
|
+
self.delegate = self;
|
81
|
+
self.title = nil;
|
82
|
+
|
83
|
+
_actions = [[NSMutableArray alloc] init];
|
84
|
+
}
|
85
|
+
return self;
|
86
|
+
}
|
87
|
+
|
88
|
+
- (void)dealloc
|
89
|
+
{
|
90
|
+
[_userData release];
|
91
|
+
|
92
|
+
[_actions removeAllObjects];
|
93
|
+
[_actions release];
|
94
|
+
|
95
|
+
[super dealloc];
|
96
|
+
}
|
97
|
+
|
98
|
+
- (void)showInView:(UIView *)view
|
99
|
+
{
|
100
|
+
_parentView = view;
|
101
|
+
|
102
|
+
[self show];
|
103
|
+
}
|
104
|
+
|
105
|
+
- (void)showInViewController:(UIViewController *)controller
|
106
|
+
{
|
107
|
+
_parentView = controller.view;
|
108
|
+
|
109
|
+
[self show];
|
110
|
+
}
|
111
|
+
|
112
|
+
- (void)presentForController:(UIViewController *)controller
|
113
|
+
{
|
114
|
+
_parentView = controller.view;
|
115
|
+
|
116
|
+
[self show];
|
117
|
+
}
|
118
|
+
|
119
|
+
- (void)dismissAnimated:(BOOL)animated
|
120
|
+
{
|
121
|
+
[self dismissWithClickedButtonIndex:self.cancelButtonIndex animated:animated];
|
122
|
+
}
|
123
|
+
|
124
|
+
- (void)addCancelTitle:(NSString *)title
|
125
|
+
{
|
126
|
+
self.cancelButtonIndex = [self addButtonWithTitle:title];
|
127
|
+
}
|
128
|
+
|
129
|
+
- (void)addCancelTitle:(NSString *)title signal:(NSString *)signal
|
130
|
+
{
|
131
|
+
[self addCancelTitle:title signal:signal object:nil];
|
132
|
+
}
|
133
|
+
|
134
|
+
- (void)addCancelTitle:(NSString *)title signal:(NSString *)signal object:(NSDictionary *)object
|
135
|
+
{
|
136
|
+
if ( nil == signal )
|
137
|
+
{
|
138
|
+
signal = @"";
|
139
|
+
}
|
140
|
+
|
141
|
+
self.cancelButtonIndex = [self addButtonWithTitle:title];
|
142
|
+
[_actions addObject:[NSArray arrayWithObjects:title, [NSNumber numberWithInt:self.cancelButtonIndex], signal, object, nil]];
|
143
|
+
}
|
144
|
+
|
145
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal
|
146
|
+
{
|
147
|
+
[self addButtonTitle:title signal:signal object:nil];
|
148
|
+
}
|
149
|
+
|
150
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal object:(NSDictionary *)object
|
151
|
+
{
|
152
|
+
if ( nil == signal )
|
153
|
+
{
|
154
|
+
signal = @"";
|
155
|
+
}
|
156
|
+
|
157
|
+
NSInteger index = [self addButtonWithTitle:title];
|
158
|
+
[_actions addObject:[NSArray arrayWithObjects:title, [NSNumber numberWithInt:index], signal, object, nil]];
|
159
|
+
}
|
160
|
+
|
161
|
+
#pragma mark -
|
162
|
+
#pragma mark UIActionSheetDelegate
|
163
|
+
|
164
|
+
// Called when a button is clicked. The view will be automatically dismissed after this call returns
|
165
|
+
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
|
166
|
+
{
|
167
|
+
// NSString * selectTitle = [alertView buttonTitleAtIndex:buttonIndex];
|
168
|
+
|
169
|
+
for ( NSArray * array in _actions )
|
170
|
+
{
|
171
|
+
// NSString * actionTitle = [array objectAtIndex:0];
|
172
|
+
// if ( NO == [actionTitle isEqualToString:selectTitle] )
|
173
|
+
// continue;
|
174
|
+
|
175
|
+
NSNumber * index = [array objectAtIndex:1];
|
176
|
+
if ( [index intValue] == buttonIndex )
|
177
|
+
{
|
178
|
+
NSString * signal = [array objectAtIndex:2];
|
179
|
+
if ( signal && [signal length] )
|
180
|
+
{
|
181
|
+
NSObject * object = ([array count] >= 4) ? [array objectAtIndex:3] : nil;
|
182
|
+
[_parentView sendUISignal:signal
|
183
|
+
withObject:object
|
184
|
+
from:self];
|
185
|
+
}
|
186
|
+
else if ( buttonIndex != self.cancelButtonIndex )
|
187
|
+
{
|
188
|
+
[self dismissWithClickedButtonIndex:buttonIndex animated:YES];
|
189
|
+
}
|
190
|
+
|
191
|
+
break;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
// Called when we cancel a view (eg. the user clicks the Home button). This is not called when the user clicks the cancel button.
|
197
|
+
// If not defined in the delegate, we simulate a click in the cancel button
|
198
|
+
- (void)alertViewCancel:(UIAlertView *)alertView
|
199
|
+
{
|
200
|
+
}
|
201
|
+
|
202
|
+
// before animation and showing view
|
203
|
+
- (void)willPresentAlertView:(UIAlertView *)alertView
|
204
|
+
{
|
205
|
+
[_parentView sendUISignal:BeeUIAlertView.WILL_PRESENT withObject:nil from:self];
|
206
|
+
}
|
207
|
+
|
208
|
+
// after animation
|
209
|
+
- (void)didPresentAlertView:(UIAlertView *)alertView;
|
210
|
+
{
|
211
|
+
[_parentView sendUISignal:BeeUIAlertView.DID_PRESENT withObject:nil from:self];
|
212
|
+
}
|
213
|
+
|
214
|
+
// before animation and hiding view
|
215
|
+
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
|
216
|
+
{
|
217
|
+
[_parentView sendUISignal:BeeUIAlertView.WILL_DISMISS withObject:nil from:self];
|
218
|
+
}
|
219
|
+
|
220
|
+
// after animation
|
221
|
+
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
222
|
+
{
|
223
|
+
[_parentView sendUISignal:BeeUIAlertView.DID_DISMISS withObject:nil from:self];
|
224
|
+
}
|
225
|
+
|
226
|
+
// Called after edits in any of the default fields added by the style
|
227
|
+
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView
|
228
|
+
{
|
229
|
+
return YES;
|
230
|
+
}
|
231
|
+
|
232
|
+
@end
|
233
|
+
|
234
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,97 @@
|
|
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_UIButton.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
|
+
@class BeeUIButton;
|
41
|
+
|
42
|
+
@interface BeeUIButtonState : NSObject
|
43
|
+
{
|
44
|
+
BeeUIButton * _button;
|
45
|
+
UIControlState _state;
|
46
|
+
}
|
47
|
+
|
48
|
+
@property (nonatomic, assign) BeeUIButton * button;
|
49
|
+
@property (nonatomic, assign) UIControlState state;
|
50
|
+
@property (nonatomic, assign) NSString * title;
|
51
|
+
@property (nonatomic, assign) UIColor * titleColor;
|
52
|
+
@property (nonatomic, assign) UIColor * titleShadowColor;
|
53
|
+
@property (nonatomic, assign) UIImage * image;
|
54
|
+
@property (nonatomic, assign) UIImage * backgroundImage;
|
55
|
+
|
56
|
+
@end
|
57
|
+
|
58
|
+
#pragma mark -
|
59
|
+
|
60
|
+
@interface BeeUIButton : UIButton
|
61
|
+
{
|
62
|
+
NSMutableArray * _actions;
|
63
|
+
UILabel * _label;
|
64
|
+
UIEdgeInsets _insets;
|
65
|
+
|
66
|
+
BeeUIButtonState * _stateNormal;
|
67
|
+
BeeUIButtonState * _stateHighlighted;
|
68
|
+
BeeUIButtonState * _stateDisabled;
|
69
|
+
BeeUIButtonState * _stateSelected;
|
70
|
+
}
|
71
|
+
|
72
|
+
AS_SIGNAL( TOUCH_DOWN ) // 按下
|
73
|
+
AS_SIGNAL( TOUCH_DOWN_REPEAT ) // 长按
|
74
|
+
AS_SIGNAL( TOUCH_UP_INSIDE ) // 抬起(击中)
|
75
|
+
AS_SIGNAL( TOUCH_UP_OUTSIDE ) // 抬起(未击中)
|
76
|
+
AS_SIGNAL( TOUCH_UP_CANCEL ) // 撤销
|
77
|
+
|
78
|
+
@property (nonatomic, retain) NSString * title;
|
79
|
+
@property (nonatomic, retain) UIColor * titleColor;
|
80
|
+
@property (nonatomic, retain) UIFont * titleFont;
|
81
|
+
@property (nonatomic, assign) UIEdgeInsets titleInsets;
|
82
|
+
@property (nonatomic, assign) UITextAlignment titleTextAlignment;
|
83
|
+
|
84
|
+
@property (nonatomic, readonly) BeeUIButtonState * stateNormal;
|
85
|
+
@property (nonatomic, readonly) BeeUIButtonState * stateHighlighted;
|
86
|
+
@property (nonatomic, readonly) BeeUIButtonState * stateDisabled;
|
87
|
+
@property (nonatomic, readonly) BeeUIButtonState * stateSelected;
|
88
|
+
|
89
|
+
+ (BeeUIButton *)spawn;
|
90
|
+
+ (BeeUIButton *)spawn:(NSString *)tagString;
|
91
|
+
|
92
|
+
- (void)addSignal:(NSString *)signal forControlEvents:(UIControlEvents)controlEvents;
|
93
|
+
- (void)addSignal:(NSString *)signal forControlEvents:(UIControlEvents)controlEvents object:(NSObject *)object;
|
94
|
+
|
95
|
+
@end
|
96
|
+
|
97
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|