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,249 @@
|
|
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_UITabBar.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UITabBar.h"
|
37
|
+
#import "Bee_UISignal.h"
|
38
|
+
#import "UIView+BeeExtension.h"
|
39
|
+
#import "UIView+BeeUISignal.h"
|
40
|
+
|
41
|
+
#pragma mark -
|
42
|
+
|
43
|
+
@interface BeeUITabBar(Private)
|
44
|
+
- (void)initSelf;
|
45
|
+
@end
|
46
|
+
|
47
|
+
#pragma mark -
|
48
|
+
|
49
|
+
@implementation BeeUITabBar
|
50
|
+
|
51
|
+
DEF_SIGNAL( HIGHLIGHT_CHANGED )
|
52
|
+
|
53
|
+
@dynamic selectedIndex;
|
54
|
+
@dynamic selectedTag;
|
55
|
+
|
56
|
+
+ (BeeUITabBar *)spawn
|
57
|
+
{
|
58
|
+
return [[[BeeUITabBar alloc] initWithFrame:CGRectZero] autorelease];
|
59
|
+
}
|
60
|
+
|
61
|
+
+ (BeeUITabBar *)spawn:(NSString *)tagString
|
62
|
+
{
|
63
|
+
BeeUITabBar * view = [[[BeeUITabBar alloc] init] autorelease];
|
64
|
+
view.tagString = tagString;
|
65
|
+
return view;
|
66
|
+
}
|
67
|
+
|
68
|
+
- (id)init
|
69
|
+
{
|
70
|
+
if( (self = [super initWithFrame:CGRectZero]) )
|
71
|
+
{
|
72
|
+
[self initSelf];
|
73
|
+
}
|
74
|
+
return self;
|
75
|
+
}
|
76
|
+
|
77
|
+
- (id)initWithFrame:(CGRect)frame
|
78
|
+
{
|
79
|
+
if( (self = [super initWithFrame:frame]) )
|
80
|
+
{
|
81
|
+
[self initSelf];
|
82
|
+
}
|
83
|
+
return self;
|
84
|
+
}
|
85
|
+
|
86
|
+
// thanks to @ilikeido
|
87
|
+
- (id)initWithCoder:(NSCoder *)aDecoder
|
88
|
+
{
|
89
|
+
self = [super initWithCoder:aDecoder];
|
90
|
+
if ( self )
|
91
|
+
{
|
92
|
+
[self initSelf];
|
93
|
+
}
|
94
|
+
return self;
|
95
|
+
}
|
96
|
+
|
97
|
+
- (void)initSelf
|
98
|
+
{
|
99
|
+
self.opaque = NO;
|
100
|
+
self.backgroundColor = [UIColor clearColor];
|
101
|
+
self.delegate = self;
|
102
|
+
self.items = [NSArray array];
|
103
|
+
self.selectedItem = nil;
|
104
|
+
|
105
|
+
[_barItems release];
|
106
|
+
_barItems = [[NSMutableArray alloc] init];
|
107
|
+
_barSignals = [[NSMutableDictionary alloc] init];
|
108
|
+
}
|
109
|
+
|
110
|
+
- (void)dealloc
|
111
|
+
{
|
112
|
+
[_barSignals removeAllObjects];
|
113
|
+
[_barSignals release];
|
114
|
+
|
115
|
+
[_barItems removeAllObjects];
|
116
|
+
[_barItems release];
|
117
|
+
|
118
|
+
[super dealloc];
|
119
|
+
}
|
120
|
+
|
121
|
+
- (void)hilite:(NSInteger)tag
|
122
|
+
{
|
123
|
+
[self setSelectedTag:tag];
|
124
|
+
}
|
125
|
+
|
126
|
+
- (void)addTitle:(NSString *)title
|
127
|
+
{
|
128
|
+
[self addTitle:title image:nil tag:_barItems.count];
|
129
|
+
}
|
130
|
+
|
131
|
+
- (void)addTitle:(NSString *)title tag:(NSInteger)tag;
|
132
|
+
{
|
133
|
+
[self addTitle:title image:nil tag:tag];
|
134
|
+
}
|
135
|
+
|
136
|
+
- (void)addTitle:(NSString *)title tag:(NSInteger)tag signal:(NSString *)signal
|
137
|
+
{
|
138
|
+
[self addTitle:title image:nil tag:tag signal:signal];
|
139
|
+
}
|
140
|
+
|
141
|
+
- (void)addImage:(UIImage *)image
|
142
|
+
{
|
143
|
+
[self addTitle:nil image:image tag:_barItems.count];
|
144
|
+
}
|
145
|
+
|
146
|
+
- (void)addImage:(UIImage *)image tag:(NSInteger)tag
|
147
|
+
{
|
148
|
+
[self addTitle:nil image:image tag:tag];
|
149
|
+
}
|
150
|
+
|
151
|
+
- (void)addImage:(UIImage *)image tag:(NSInteger)tag signal:(NSString *)signal
|
152
|
+
{
|
153
|
+
[self addTitle:nil image:image tag:tag signal:signal];
|
154
|
+
}
|
155
|
+
|
156
|
+
- (void)addTitle:(NSString *)title image:(UIImage *)image
|
157
|
+
{
|
158
|
+
[self addTitle:title image:image tag:_barItems.count];
|
159
|
+
}
|
160
|
+
|
161
|
+
- (void)addTitle:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag
|
162
|
+
{
|
163
|
+
[self addTitle:title image:image tag:tag signal:nil];
|
164
|
+
}
|
165
|
+
|
166
|
+
- (void)addTitle:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag signal:(NSString *)signal
|
167
|
+
{
|
168
|
+
UITabBarItem * item = [[[UITabBarItem alloc] initWithTitle:title image:image tag:tag] autorelease];
|
169
|
+
if ( item )
|
170
|
+
{
|
171
|
+
[_barItems addObject:item];
|
172
|
+
[self setItems:_barItems animated:NO];
|
173
|
+
|
174
|
+
if ( signal )
|
175
|
+
{
|
176
|
+
[_barSignals setObject:signal forKey:[NSString stringWithFormat:@"%p", item]];
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
- (NSInteger)selectedIndex
|
182
|
+
{
|
183
|
+
for ( NSObject * obj in self.items )
|
184
|
+
{
|
185
|
+
if ( obj == self.selectedItem )
|
186
|
+
{
|
187
|
+
return [self.items indexOfObject:obj];
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
return -1;
|
192
|
+
}
|
193
|
+
|
194
|
+
- (void)setSelectedIndex:(NSInteger)index
|
195
|
+
{
|
196
|
+
if ( index < _barItems.count )
|
197
|
+
{
|
198
|
+
UITabBarItem * item = [_barItems objectAtIndex:index];
|
199
|
+
|
200
|
+
[self setSelectedItem:item];
|
201
|
+
[self tabBar:self didSelectItem:item];
|
202
|
+
}
|
203
|
+
else
|
204
|
+
{
|
205
|
+
[self setSelectedItem:nil];
|
206
|
+
// [self tabBar:self didSelectItem:item];
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
- (NSInteger)selectedTag
|
211
|
+
{
|
212
|
+
return self.selectedItem.tag;
|
213
|
+
}
|
214
|
+
|
215
|
+
- (void)setSelectedTag:(NSInteger)tag
|
216
|
+
{
|
217
|
+
for ( UITabBarItem * item in _barItems )
|
218
|
+
{
|
219
|
+
if ( item.tag == tag )
|
220
|
+
{
|
221
|
+
[self setSelectedItem:item];
|
222
|
+
[self tabBar:self didSelectItem:item];
|
223
|
+
break;
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
#pragma mark -
|
229
|
+
|
230
|
+
// called when a new view is selected by the user (but not programatically)
|
231
|
+
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
|
232
|
+
{
|
233
|
+
NSString * key = [NSString stringWithFormat:@"%p", item];
|
234
|
+
NSString * signal = [_barSignals objectForKey:key];
|
235
|
+
if ( signal )
|
236
|
+
{
|
237
|
+
[self sendUISignal:signal
|
238
|
+
withObject:[NSNumber numberWithInt:item.tag]];
|
239
|
+
}
|
240
|
+
else
|
241
|
+
{
|
242
|
+
[self sendUISignal:BeeUITabBar.HIGHLIGHT_CHANGED
|
243
|
+
withObject:[NSNumber numberWithInt:item.tag]];
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
@end
|
248
|
+
|
249
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,67 @@
|
|
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_UITextField.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 BeeUITextFieldAgent;
|
41
|
+
|
42
|
+
@interface BeeUITextField : UITextField
|
43
|
+
{
|
44
|
+
BeeUITextFieldAgent * _agent;
|
45
|
+
NSUInteger _maxLength;
|
46
|
+
UIResponder * _nextChain;
|
47
|
+
}
|
48
|
+
|
49
|
+
@property (nonatomic, assign) BOOL active;
|
50
|
+
@property (nonatomic, assign) NSUInteger maxLength;
|
51
|
+
@property (nonatomic, assign) NSObject * nextChain;
|
52
|
+
|
53
|
+
AS_SIGNAL( WILL_ACTIVE ) // 将要获取焦点
|
54
|
+
AS_SIGNAL( DID_ACTIVED ) // 已经获取焦点
|
55
|
+
AS_SIGNAL( WILL_DEACTIVE ) // 已经丢失焦点
|
56
|
+
AS_SIGNAL( DID_DEACTIVED ) // 已经丢失焦点
|
57
|
+
AS_SIGNAL( TEXT_CHANGED ) // 文字变了
|
58
|
+
AS_SIGNAL( TEXT_OVERFLOW ) // 文字超长
|
59
|
+
AS_SIGNAL( CLEAR ) // 清空
|
60
|
+
AS_SIGNAL( RETURN ) // 换行
|
61
|
+
|
62
|
+
+ (BeeUITextField *)spawn;
|
63
|
+
+ (BeeUITextField *)spawn:(NSString *)tagString;
|
64
|
+
|
65
|
+
@end
|
66
|
+
|
67
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,242 @@
|
|
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_UITextField.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UITextField.h"
|
37
|
+
#import "Bee_UISignal.h"
|
38
|
+
#import "UIView+BeeExtension.h"
|
39
|
+
#import "UIView+BeeUISignal.h"
|
40
|
+
|
41
|
+
#pragma mark -
|
42
|
+
|
43
|
+
@interface BeeUITextFieldAgent : NSObject<UITextFieldDelegate>
|
44
|
+
{
|
45
|
+
BeeUITextField * _target;
|
46
|
+
}
|
47
|
+
|
48
|
+
@property (nonatomic, assign) BeeUITextField * target;
|
49
|
+
|
50
|
+
@end
|
51
|
+
|
52
|
+
#pragma mark -
|
53
|
+
|
54
|
+
@implementation BeeUITextFieldAgent
|
55
|
+
|
56
|
+
@synthesize target = _target;
|
57
|
+
|
58
|
+
#pragma mark -
|
59
|
+
|
60
|
+
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
|
61
|
+
{
|
62
|
+
[_target sendUISignal:BeeUITextField.WILL_ACTIVE];
|
63
|
+
return YES;
|
64
|
+
}
|
65
|
+
|
66
|
+
- (void)textFieldDidBeginEditing:(UITextField *)textField
|
67
|
+
{
|
68
|
+
[_target sendUISignal:BeeUITextField.DID_ACTIVED];
|
69
|
+
}
|
70
|
+
|
71
|
+
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField
|
72
|
+
{
|
73
|
+
[_target sendUISignal:BeeUITextField.WILL_DEACTIVE];
|
74
|
+
return YES;
|
75
|
+
}
|
76
|
+
|
77
|
+
- (void)textFieldDidEndEditing:(UITextField *)textField
|
78
|
+
{
|
79
|
+
[_target sendUISignal:BeeUITextField.DID_DEACTIVED];
|
80
|
+
}
|
81
|
+
|
82
|
+
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
|
83
|
+
{
|
84
|
+
if ( 1 == range.length )
|
85
|
+
{
|
86
|
+
NSString * text = [_target.text stringByReplacingCharactersInRange:range withString:@""];
|
87
|
+
[_target sendUISignal:BeeUITextField.TEXT_CHANGED withObject:text];
|
88
|
+
return YES;
|
89
|
+
}
|
90
|
+
else
|
91
|
+
{
|
92
|
+
NSString * text = [_target.text stringByReplacingCharactersInRange:range withString:string];
|
93
|
+
if ( _target.maxLength > 0 && text.length > _target.maxLength )
|
94
|
+
{
|
95
|
+
[_target sendUISignal:BeeUITextField.TEXT_OVERFLOW];
|
96
|
+
return NO;
|
97
|
+
}
|
98
|
+
|
99
|
+
[_target sendUISignal:BeeUITextField.TEXT_CHANGED withObject:text];
|
100
|
+
return YES;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
- (BOOL)textFieldShouldClear:(UITextField *)textField
|
105
|
+
{
|
106
|
+
BeeUISignal * signal = [_target sendUISignal:BeeUITextField.CLEAR];
|
107
|
+
if ( signal && signal.returnValue )
|
108
|
+
{
|
109
|
+
return signal.boolValue;
|
110
|
+
}
|
111
|
+
|
112
|
+
return YES;
|
113
|
+
}
|
114
|
+
|
115
|
+
- (BOOL)textFieldShouldReturn:(UITextField *)textField
|
116
|
+
{
|
117
|
+
BeeUISignal * signal = [_target sendUISignal:BeeUITextField.RETURN];
|
118
|
+
if ( signal && signal.returnValue )
|
119
|
+
{
|
120
|
+
return signal.boolValue;
|
121
|
+
}
|
122
|
+
|
123
|
+
return YES;
|
124
|
+
}
|
125
|
+
|
126
|
+
@end
|
127
|
+
|
128
|
+
#pragma mark -
|
129
|
+
|
130
|
+
@interface BeeUITextField(Private)
|
131
|
+
- (void)initSelf;
|
132
|
+
@end
|
133
|
+
|
134
|
+
@implementation BeeUITextField
|
135
|
+
|
136
|
+
DEF_SIGNAL( WILL_ACTIVE )
|
137
|
+
DEF_SIGNAL( DID_ACTIVED )
|
138
|
+
DEF_SIGNAL( WILL_DEACTIVE )
|
139
|
+
DEF_SIGNAL( DID_DEACTIVED )
|
140
|
+
DEF_SIGNAL( TEXT_CHANGED )
|
141
|
+
DEF_SIGNAL( TEXT_OVERFLOW )
|
142
|
+
DEF_SIGNAL( CLEAR )
|
143
|
+
DEF_SIGNAL( RETURN )
|
144
|
+
|
145
|
+
@synthesize nextChain = _nextChain;
|
146
|
+
@synthesize maxLength = _maxLength;
|
147
|
+
|
148
|
+
+ (BeeUITextField *)spawn
|
149
|
+
{
|
150
|
+
return [[[BeeUITextField alloc] initWithFrame:CGRectZero] autorelease];
|
151
|
+
}
|
152
|
+
|
153
|
+
+ (BeeUITextField *)spawn:(NSString *)tagString
|
154
|
+
{
|
155
|
+
BeeUITextField * view = [[[BeeUITextField alloc] init] autorelease];
|
156
|
+
view.tagString = tagString;
|
157
|
+
return view;
|
158
|
+
}
|
159
|
+
|
160
|
+
- (id)init
|
161
|
+
{
|
162
|
+
if( (self = [super initWithFrame:CGRectZero]) )
|
163
|
+
{
|
164
|
+
[self initSelf];
|
165
|
+
}
|
166
|
+
return self;
|
167
|
+
}
|
168
|
+
|
169
|
+
- (id)initWithFrame:(CGRect)frame
|
170
|
+
{
|
171
|
+
if( (self = [super initWithFrame:frame]) )
|
172
|
+
{
|
173
|
+
[self initSelf];
|
174
|
+
}
|
175
|
+
return self;
|
176
|
+
}
|
177
|
+
|
178
|
+
// thanks to @ilikeido
|
179
|
+
- (id)initWithCoder:(NSCoder *)aDecoder
|
180
|
+
{
|
181
|
+
self = [super initWithCoder:aDecoder];
|
182
|
+
if ( self )
|
183
|
+
{
|
184
|
+
[self initSelf];
|
185
|
+
}
|
186
|
+
return self;
|
187
|
+
}
|
188
|
+
|
189
|
+
- (void)initSelf
|
190
|
+
{
|
191
|
+
[_agent release];
|
192
|
+
_agent = [[BeeUITextFieldAgent alloc] init];
|
193
|
+
_agent.target = self;
|
194
|
+
|
195
|
+
_maxLength = 0;
|
196
|
+
|
197
|
+
self.delegate = _agent;
|
198
|
+
self.opaque = NO;
|
199
|
+
self.backgroundColor = [UIColor clearColor];
|
200
|
+
}
|
201
|
+
|
202
|
+
- (void)dealloc
|
203
|
+
{
|
204
|
+
[_agent release];
|
205
|
+
|
206
|
+
[super dealloc];
|
207
|
+
}
|
208
|
+
|
209
|
+
- (BOOL)active
|
210
|
+
{
|
211
|
+
return [self isFirstResponder];
|
212
|
+
}
|
213
|
+
|
214
|
+
- (void)setActive:(BOOL)flag
|
215
|
+
{
|
216
|
+
if ( flag )
|
217
|
+
{
|
218
|
+
[self becomeFirstResponder];
|
219
|
+
}
|
220
|
+
else
|
221
|
+
{
|
222
|
+
[self resignFirstResponder];
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
- (void)handleUISignal:(BeeUISignal *)signal
|
227
|
+
{
|
228
|
+
if ( [signal is:BeeUITextField.RETURN] )
|
229
|
+
{
|
230
|
+
if ( _nextChain && _nextChain != self )
|
231
|
+
{
|
232
|
+
[_nextChain becomeFirstResponder];
|
233
|
+
return;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
237
|
+
[super handleUISignal:signal];
|
238
|
+
}
|
239
|
+
|
240
|
+
@end
|
241
|
+
|
242
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,75 @@
|
|
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_UITextView.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 BeeUITextViewAgent;
|
41
|
+
|
42
|
+
@interface BeeUITextView : UITextView
|
43
|
+
{
|
44
|
+
BeeUITextViewAgent * _agent;
|
45
|
+
NSString * _placeholder;
|
46
|
+
UIColor * _placeHolderColor;
|
47
|
+
UILabel * _placeHolderLabel;
|
48
|
+
NSUInteger _maxLength;
|
49
|
+
UIResponder * _nextChain;
|
50
|
+
}
|
51
|
+
|
52
|
+
AS_SIGNAL( WILL_ACTIVE ) // 将要获取焦点
|
53
|
+
AS_SIGNAL( DID_ACTIVED ) // 已经获取焦点
|
54
|
+
AS_SIGNAL( WILL_DEACTIVE ) // 已经丢失焦点
|
55
|
+
AS_SIGNAL( DID_DEACTIVED ) // 已经丢失焦点
|
56
|
+
AS_SIGNAL( TEXT_CHANGED ) // 文字变了
|
57
|
+
AS_SIGNAL( TEXT_OVERFLOW ) // 文字超长
|
58
|
+
AS_SIGNAL( SELECTION_CHANGED ) // 光标位置
|
59
|
+
AS_SIGNAL( RETURN ) // 换行
|
60
|
+
|
61
|
+
@property (nonatomic, assign) BOOL active;
|
62
|
+
@property (nonatomic, retain) NSString * placeholder;
|
63
|
+
@property (nonatomic, retain) UILabel * placeHolderLabel;
|
64
|
+
@property (nonatomic, retain) UIColor * placeHolderColor;
|
65
|
+
@property (nonatomic, assign) NSUInteger maxLength;
|
66
|
+
@property (nonatomic, assign) NSObject * nextChain;
|
67
|
+
|
68
|
+
+ (BeeUITextView *)spawn;
|
69
|
+
+ (BeeUITextView *)spawn:(NSString *)tagString;
|
70
|
+
|
71
|
+
- (void)updatePlaceHolder;
|
72
|
+
|
73
|
+
@end
|
74
|
+
|
75
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|