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,64 @@
|
|
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_Model.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
|
35
|
+
#pragma mark -
|
36
|
+
|
37
|
+
@protocol BeeSerializable<NSObject>
|
38
|
+
@required
|
39
|
+
- (void)serialize; // save into DB
|
40
|
+
- (void)unserialize; // load from DB
|
41
|
+
@end
|
42
|
+
|
43
|
+
#pragma mark -
|
44
|
+
|
45
|
+
@interface BeeModel : NSObject<BeeSerializable>
|
46
|
+
{
|
47
|
+
NSString * _name;
|
48
|
+
NSMutableArray * _observers;
|
49
|
+
}
|
50
|
+
|
51
|
+
@property (nonatomic, retain) NSString * name;
|
52
|
+
@property (nonatomic, retain) NSMutableArray * observers;
|
53
|
+
|
54
|
+
+ (NSMutableArray *)models;
|
55
|
+
+ (NSMutableArray *)modelByClass:(Class)clazz;
|
56
|
+
+ (NSMutableArray *)modelByName:(NSString *)name;
|
57
|
+
|
58
|
+
- (void)load;
|
59
|
+
- (void)unload;
|
60
|
+
|
61
|
+
- (void)addObserver:(id)obj;
|
62
|
+
- (void)removeObserver:(id)obj;
|
63
|
+
|
64
|
+
@end
|
@@ -0,0 +1,190 @@
|
|
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_Model.h
|
31
|
+
//
|
32
|
+
|
33
|
+
#import "Bee_Precompile.h"
|
34
|
+
#import "Bee_Model.h"
|
35
|
+
#import "Bee_Controller.h"
|
36
|
+
#import "Bee_Network.h"
|
37
|
+
#import "NSArray+BeeExtension.h"
|
38
|
+
#import "NSObject+BeeMessage.h"
|
39
|
+
|
40
|
+
#import "JSONKit.h"
|
41
|
+
|
42
|
+
#pragma mark -
|
43
|
+
|
44
|
+
@implementation BeeModel
|
45
|
+
|
46
|
+
@synthesize name = _name;
|
47
|
+
@synthesize observers = _observers;
|
48
|
+
|
49
|
+
static NSMutableArray * __models = nil;
|
50
|
+
|
51
|
+
+ (NSMutableArray *)models
|
52
|
+
{
|
53
|
+
return __models;
|
54
|
+
}
|
55
|
+
|
56
|
+
+ (NSMutableArray *)modelByClass:(Class)clazz
|
57
|
+
{
|
58
|
+
if ( nil == __models )
|
59
|
+
return nil;
|
60
|
+
|
61
|
+
NSMutableArray * array = [NSMutableArray array];
|
62
|
+
|
63
|
+
for ( BeeModel * model in __models )
|
64
|
+
{
|
65
|
+
if ( [model isKindOfClass:clazz] )
|
66
|
+
{
|
67
|
+
[array addObject:model];
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
return array;
|
72
|
+
}
|
73
|
+
|
74
|
+
+ (NSMutableArray *)modelByName:(NSString *)name
|
75
|
+
{
|
76
|
+
if ( nil == __models )
|
77
|
+
return nil;
|
78
|
+
|
79
|
+
NSMutableArray * array = [NSMutableArray array];
|
80
|
+
|
81
|
+
for ( BeeModel * model in __models )
|
82
|
+
{
|
83
|
+
if ( [model.name isEqualToString:name] )
|
84
|
+
{
|
85
|
+
[array addObject:model];
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
return array;
|
90
|
+
}
|
91
|
+
|
92
|
+
- (id)init
|
93
|
+
{
|
94
|
+
self = [super init];
|
95
|
+
if ( self )
|
96
|
+
{
|
97
|
+
[self initSelf];
|
98
|
+
[self load];
|
99
|
+
}
|
100
|
+
return self;
|
101
|
+
}
|
102
|
+
|
103
|
+
- (void)initSelf
|
104
|
+
{
|
105
|
+
if ( nil == __models )
|
106
|
+
{
|
107
|
+
__models = [[NSMutableArray nonRetainingArray] retain];
|
108
|
+
}
|
109
|
+
|
110
|
+
[__models addObject:self];
|
111
|
+
|
112
|
+
_name = [[[self class] description] retain];
|
113
|
+
_observers = [[NSMutableArray alloc] init];
|
114
|
+
}
|
115
|
+
|
116
|
+
- (void)load
|
117
|
+
{
|
118
|
+
// if ( [self respondsToSelector:@selector(unserialize)] )
|
119
|
+
// {
|
120
|
+
[self unserialize];
|
121
|
+
// }
|
122
|
+
}
|
123
|
+
|
124
|
+
- (void)unload
|
125
|
+
{
|
126
|
+
// if ( [self respondsToSelector:@selector(serialize)] )
|
127
|
+
// {
|
128
|
+
[self serialize];
|
129
|
+
// }
|
130
|
+
}
|
131
|
+
|
132
|
+
- (void)serialize
|
133
|
+
{
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
- (void)unserialize
|
138
|
+
{
|
139
|
+
|
140
|
+
}
|
141
|
+
|
142
|
+
- (void)addObserver:(id)obj
|
143
|
+
{
|
144
|
+
if ( [_observers containsObject:obj] )
|
145
|
+
return;
|
146
|
+
|
147
|
+
[_observers addObject:obj];
|
148
|
+
}
|
149
|
+
|
150
|
+
- (void)removeObserver:(id)obj
|
151
|
+
{
|
152
|
+
if ( [_observers containsObject:obj] )
|
153
|
+
{
|
154
|
+
[_observers removeObject:obj];
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
- (void)dealloc
|
159
|
+
{
|
160
|
+
[self unload];
|
161
|
+
[self cancelMessages];
|
162
|
+
[self cancelRequests];
|
163
|
+
|
164
|
+
[_observers removeAllObjects];
|
165
|
+
[_observers release];
|
166
|
+
|
167
|
+
[_name release];
|
168
|
+
|
169
|
+
[__models removeObject:self];
|
170
|
+
|
171
|
+
[super dealloc];
|
172
|
+
}
|
173
|
+
|
174
|
+
- (void)handleMessage:(BeeMessage *)msg
|
175
|
+
{
|
176
|
+
for ( NSObject * obj in _observers )
|
177
|
+
{
|
178
|
+
[msg forwardResponder:obj];
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
- (void)handleRequest:(BeeRequest *)request
|
183
|
+
{
|
184
|
+
for ( NSObject * obj in _observers )
|
185
|
+
{
|
186
|
+
[request forwardResponder:obj];
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
@end
|
@@ -0,0 +1,71 @@
|
|
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_UIActionSheet.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 BeeUIActionSheet : UIActionSheet<UIActionSheetDelegate>
|
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
|
+
+ (BeeUIActionSheet *)spawn;
|
56
|
+
+ (BeeUIActionSheet *)spawn:(NSString * )tagString;
|
57
|
+
|
58
|
+
- (void)showInViewController:(UIViewController *)controller; // samw as presentForController:
|
59
|
+
- (void)presentForController:(UIViewController *)controller;
|
60
|
+
- (void)dismissAnimated:(BOOL)animated;
|
61
|
+
|
62
|
+
- (void)addCancelTitle:(NSString *)title;
|
63
|
+
- (void)addCancelTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object;
|
64
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal;
|
65
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object;
|
66
|
+
- (void)addDestructiveTitle:(NSString *)title signal:(NSString *)signal;
|
67
|
+
- (void)addDestructiveTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object;
|
68
|
+
|
69
|
+
@end
|
70
|
+
|
71
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -0,0 +1,307 @@
|
|
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_UIActionSheet.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UIActionSheet.h"
|
37
|
+
#import "Bee_UISignal.h"
|
38
|
+
#import "UIView+BeeExtension.h"
|
39
|
+
#import "UIView+BeeUISignal.h"
|
40
|
+
|
41
|
+
#pragma mark -
|
42
|
+
|
43
|
+
@implementation BeeUIActionSheet
|
44
|
+
|
45
|
+
DEF_SIGNAL( WILL_PRESENT )
|
46
|
+
DEF_SIGNAL( DID_PRESENT )
|
47
|
+
DEF_SIGNAL( WILL_DISMISS )
|
48
|
+
DEF_SIGNAL( DID_DISMISS )
|
49
|
+
|
50
|
+
@synthesize parentView = _parentView;
|
51
|
+
@synthesize userData = _userData;
|
52
|
+
|
53
|
+
+ (BeeUIActionSheet *)spawn
|
54
|
+
{
|
55
|
+
return [[[BeeUIActionSheet alloc] init] autorelease];
|
56
|
+
}
|
57
|
+
|
58
|
+
+ (BeeUIActionSheet *)spawn:(NSString * )tagString
|
59
|
+
{
|
60
|
+
BeeUIActionSheet * view = [[[BeeUIActionSheet alloc] init] autorelease];
|
61
|
+
view.tagString = tagString;
|
62
|
+
return view;
|
63
|
+
}
|
64
|
+
|
65
|
+
- (id)init
|
66
|
+
{
|
67
|
+
self = [super init];
|
68
|
+
if ( self )
|
69
|
+
{
|
70
|
+
self.delegate = self;
|
71
|
+
self.title = nil;
|
72
|
+
self.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
|
73
|
+
|
74
|
+
_actions = [[NSMutableArray alloc] init];
|
75
|
+
}
|
76
|
+
return self;
|
77
|
+
}
|
78
|
+
|
79
|
+
- (void)dealloc
|
80
|
+
{
|
81
|
+
[_userData release];
|
82
|
+
|
83
|
+
[_actions removeAllObjects];
|
84
|
+
[_actions release];
|
85
|
+
|
86
|
+
[super dealloc];
|
87
|
+
}
|
88
|
+
|
89
|
+
- (void)showFromToolbar:(UIToolbar *)view
|
90
|
+
{
|
91
|
+
_parentView = view;
|
92
|
+
|
93
|
+
[super showFromToolbar:view];
|
94
|
+
}
|
95
|
+
|
96
|
+
- (void)showFromTabBar:(UITabBar *)view
|
97
|
+
{
|
98
|
+
_parentView = view;
|
99
|
+
|
100
|
+
[super showFromTabBar:view];
|
101
|
+
}
|
102
|
+
|
103
|
+
- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated
|
104
|
+
{
|
105
|
+
if ( item.target && [item.target isKindOfClass:[UIView class]] )
|
106
|
+
{
|
107
|
+
_parentView = item.target;
|
108
|
+
}
|
109
|
+
|
110
|
+
[super showFromBarButtonItem:item animated:animated];
|
111
|
+
}
|
112
|
+
|
113
|
+
- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated
|
114
|
+
{
|
115
|
+
_parentView = view;
|
116
|
+
|
117
|
+
[super showFromRect:rect inView:view animated:animated];
|
118
|
+
}
|
119
|
+
|
120
|
+
- (void)showInView:(UIView *)view
|
121
|
+
{
|
122
|
+
_parentView = view;
|
123
|
+
|
124
|
+
[super showInView:view];
|
125
|
+
}
|
126
|
+
|
127
|
+
- (void)showInViewController:(UIViewController *)controller
|
128
|
+
{
|
129
|
+
[self presentForController:controller];
|
130
|
+
}
|
131
|
+
|
132
|
+
- (void)presentForController:(UIViewController *)controller
|
133
|
+
{
|
134
|
+
_parentView = controller.view;
|
135
|
+
|
136
|
+
[self showInView:controller.view];
|
137
|
+
}
|
138
|
+
|
139
|
+
- (void)dismissAnimated:(BOOL)animated
|
140
|
+
{
|
141
|
+
[self dismissWithClickedButtonIndex:self.cancelButtonIndex animated:animated];
|
142
|
+
}
|
143
|
+
|
144
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal
|
145
|
+
{
|
146
|
+
[self addButtonTitle:title signal:signal object:nil];
|
147
|
+
}
|
148
|
+
|
149
|
+
- (void)addButtonTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object
|
150
|
+
{
|
151
|
+
if ( nil == signal )
|
152
|
+
{
|
153
|
+
signal = @"";
|
154
|
+
}
|
155
|
+
|
156
|
+
if ( nil == object )
|
157
|
+
{
|
158
|
+
object = [NSDictionary dictionary];
|
159
|
+
}
|
160
|
+
|
161
|
+
NSInteger index = [self addButtonWithTitle:title];
|
162
|
+
[_actions addObject:[NSArray arrayWithObjects:title, [NSNumber numberWithInt:index], signal, object, nil]];
|
163
|
+
}
|
164
|
+
|
165
|
+
- (void)addCancelTitle:(NSString *)title
|
166
|
+
{
|
167
|
+
self.cancelButtonIndex = [self addButtonWithTitle:title];
|
168
|
+
}
|
169
|
+
|
170
|
+
- (void)addCancelTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object
|
171
|
+
{
|
172
|
+
if ( nil == signal )
|
173
|
+
{
|
174
|
+
signal = @"";
|
175
|
+
}
|
176
|
+
|
177
|
+
if ( nil == object )
|
178
|
+
{
|
179
|
+
object = [NSDictionary dictionary];
|
180
|
+
}
|
181
|
+
|
182
|
+
self.cancelButtonIndex = [self addButtonWithTitle:title];
|
183
|
+
[_actions addObject:[NSArray arrayWithObjects:title, [NSNumber numberWithInt:self.cancelButtonIndex], signal, object, nil]];
|
184
|
+
}
|
185
|
+
|
186
|
+
- (void)addDestructiveTitle:(NSString *)title signal:(NSString *)signal
|
187
|
+
{
|
188
|
+
[self addDestructiveTitle:title signal:signal object:nil];
|
189
|
+
}
|
190
|
+
|
191
|
+
- (void)addDestructiveTitle:(NSString *)title signal:(NSString *)signal object:(NSObject *)object
|
192
|
+
{
|
193
|
+
if ( nil == signal )
|
194
|
+
{
|
195
|
+
signal = @"";
|
196
|
+
}
|
197
|
+
|
198
|
+
if ( nil == object )
|
199
|
+
{
|
200
|
+
object = [NSDictionary dictionary];
|
201
|
+
}
|
202
|
+
|
203
|
+
self.destructiveButtonIndex = [self addButtonWithTitle:title];
|
204
|
+
[_actions addObject:[NSArray arrayWithObjects:title, [NSNumber numberWithInt:self.destructiveButtonIndex], signal, object, nil]];
|
205
|
+
}
|
206
|
+
|
207
|
+
#pragma mark -
|
208
|
+
#pragma mark UIActionSheetDelegate
|
209
|
+
|
210
|
+
// Called when a button is clicked. The view will be automatically dismissed after this call returns
|
211
|
+
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
|
212
|
+
{
|
213
|
+
// NSString * selectTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
|
214
|
+
|
215
|
+
for ( NSArray * array in _actions )
|
216
|
+
{
|
217
|
+
// NSString * actionTitle = [array objectAtIndex:0];
|
218
|
+
// if ( NO == [actionTitle isEqualToString:selectTitle] )
|
219
|
+
// continue;
|
220
|
+
|
221
|
+
NSNumber * index = [array objectAtIndex:1];
|
222
|
+
if ( [index intValue] == buttonIndex )
|
223
|
+
{
|
224
|
+
NSString * signal = [array objectAtIndex:2];
|
225
|
+
if ( signal && [signal length] )
|
226
|
+
{
|
227
|
+
NSObject * object = ([array count] >= 4) ? [array objectAtIndex:3] : nil;
|
228
|
+
if ( _parentView )
|
229
|
+
{
|
230
|
+
[_parentView sendUISignal:signal withObject:object from:self];
|
231
|
+
}
|
232
|
+
else
|
233
|
+
{
|
234
|
+
[self sendUISignal:signal withObject:object from:self];
|
235
|
+
}
|
236
|
+
}
|
237
|
+
else if ( buttonIndex != self.cancelButtonIndex && buttonIndex != self.destructiveButtonIndex )
|
238
|
+
{
|
239
|
+
[self dismissWithClickedButtonIndex:buttonIndex animated:YES];
|
240
|
+
}
|
241
|
+
|
242
|
+
break;
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
// Called when we cancel a view (eg. the user clicks the Home button). This is not called when the user clicks the cancel button.
|
248
|
+
// If not defined in the delegate, we simulate a click in the cancel button
|
249
|
+
- (void)actionSheetCancel:(UIActionSheet *)actionSheet
|
250
|
+
{
|
251
|
+
}
|
252
|
+
|
253
|
+
// before animation and showing view
|
254
|
+
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
|
255
|
+
{
|
256
|
+
if ( _parentView )
|
257
|
+
{
|
258
|
+
[_parentView sendUISignal:BeeUIActionSheet.WILL_PRESENT withObject:nil from:self];
|
259
|
+
}
|
260
|
+
else
|
261
|
+
{
|
262
|
+
[self sendUISignal:BeeUIActionSheet.WILL_PRESENT withObject:nil from:self];
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
// after animation
|
267
|
+
- (void)didPresentActionSheet:(UIActionSheet *)actionSheet
|
268
|
+
{
|
269
|
+
if ( _parentView )
|
270
|
+
{
|
271
|
+
[_parentView sendUISignal:BeeUIActionSheet.DID_PRESENT withObject:nil from:self];
|
272
|
+
}
|
273
|
+
else
|
274
|
+
{
|
275
|
+
[self sendUISignal:BeeUIActionSheet.DID_PRESENT withObject:nil from:self];
|
276
|
+
}
|
277
|
+
}
|
278
|
+
|
279
|
+
// before animation and hiding view
|
280
|
+
- (void)actionSheet:(UIActionSheet *)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex
|
281
|
+
{
|
282
|
+
if ( _parentView )
|
283
|
+
{
|
284
|
+
[_parentView sendUISignal:BeeUIActionSheet.WILL_DISMISS withObject:nil from:self];
|
285
|
+
}
|
286
|
+
else
|
287
|
+
{
|
288
|
+
[self sendUISignal:BeeUIActionSheet.WILL_DISMISS withObject:nil from:self];
|
289
|
+
}
|
290
|
+
}
|
291
|
+
|
292
|
+
// after animation
|
293
|
+
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
|
294
|
+
{
|
295
|
+
if ( _parentView )
|
296
|
+
{
|
297
|
+
[_parentView sendUISignal:BeeUIActionSheet.DID_DISMISS withObject:nil from:self];
|
298
|
+
}
|
299
|
+
else
|
300
|
+
{
|
301
|
+
[self sendUISignal:BeeUIActionSheet.DID_DISMISS withObject:nil from:self];
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
@end
|
306
|
+
|
307
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
@@ -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
|
+
// Bee_UIActivityIndicatorView.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 BeeUIActivityIndicatorView : UIActivityIndicatorView
|
41
|
+
|
42
|
+
AS_SIGNAL( WILL_START ) // 动画将要开始
|
43
|
+
AS_SIGNAL( DID_START ) // 动画已经开始
|
44
|
+
AS_SIGNAL( WILL_STOP ) // 动画将要停止
|
45
|
+
AS_SIGNAL( DID_STOP ) // 动画已经停止
|
46
|
+
|
47
|
+
+ (BeeUIActivityIndicatorView *)spawn;
|
48
|
+
+ (BeeUIActivityIndicatorView *)spawn:(NSString *)tagString;
|
49
|
+
|
50
|
+
@end
|
51
|
+
|
52
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|