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,694 @@
|
|
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_UIStack.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import "Bee_Precompile.h"
|
36
|
+
#import "Bee_UIBoard.h"
|
37
|
+
#import "Bee_UIStack.h"
|
38
|
+
#import "Bee_Runtime.h"
|
39
|
+
#import "Bee_UINavigationBar.h"
|
40
|
+
#import "UIView+BeeExtension.h"
|
41
|
+
|
42
|
+
#pragma mark -
|
43
|
+
|
44
|
+
#undef UNUSED
|
45
|
+
#define UNUSED( __x ) (void)(__x)
|
46
|
+
|
47
|
+
#pragma mark -
|
48
|
+
|
49
|
+
@implementation UIView(BeeUIStack)
|
50
|
+
|
51
|
+
- (BeeUIStack *)stack
|
52
|
+
{
|
53
|
+
UINavigationController * controller = [self navigationController];
|
54
|
+
if ( controller && [controller isKindOfClass:[BeeUIStack class]] )
|
55
|
+
{
|
56
|
+
return (BeeUIStack *)controller;
|
57
|
+
}
|
58
|
+
else
|
59
|
+
{
|
60
|
+
return nil;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
- (UINavigationController *)navigationController
|
65
|
+
{
|
66
|
+
UIViewController * controller = [self viewController];
|
67
|
+
if ( controller )
|
68
|
+
{
|
69
|
+
return controller.navigationController;
|
70
|
+
}
|
71
|
+
else
|
72
|
+
{
|
73
|
+
return nil;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
@end
|
78
|
+
|
79
|
+
#pragma mark -
|
80
|
+
|
81
|
+
@implementation BeeUIStack
|
82
|
+
|
83
|
+
@synthesize name = _name;
|
84
|
+
@synthesize parentBoard = _parentBoard;
|
85
|
+
@synthesize boards = _boards;
|
86
|
+
@synthesize topBoard = _topBoard;
|
87
|
+
|
88
|
+
DEF_INT( ANIMATION_TYPE_DEFAULT, 0 )
|
89
|
+
DEF_INT( ANIMATION_TYPE_CUBE, 1 )
|
90
|
+
DEF_INT( ANIMATION_TYPE_FADE, 2 )
|
91
|
+
DEF_INT( ANIMATION_TYPE_PAGING, 3 )
|
92
|
+
DEF_INT( ANIMATION_TYPE_SLIDE, 4 )
|
93
|
+
DEF_INT( ANIMATION_TYPE_FLIP, 5 )
|
94
|
+
|
95
|
+
+ (BeeUIStack *)stack
|
96
|
+
{
|
97
|
+
return [[[BeeUIStack alloc] initWithName:nil andFirstBoard:nil] autorelease];
|
98
|
+
}
|
99
|
+
|
100
|
+
+ (BeeUIStack *)stack:(NSString *)name
|
101
|
+
{
|
102
|
+
return [[[BeeUIStack alloc] initWithName:name andFirstBoard:nil] autorelease];
|
103
|
+
}
|
104
|
+
|
105
|
+
+ (BeeUIStack *)stack:(NSString *)name firstBoardClass:(Class)clazz
|
106
|
+
{
|
107
|
+
BeeUIBoard * board = [[(BeeUIBoard *)[BeeRuntime allocByClass:clazz] init] autorelease];
|
108
|
+
return [[[BeeUIStack alloc] initWithName:name andFirstBoard:board] autorelease];
|
109
|
+
}
|
110
|
+
|
111
|
+
+ (BeeUIStack *)stack:(NSString *)name firstBoard:(BeeUIBoard *)board
|
112
|
+
{
|
113
|
+
return [[[BeeUIStack alloc] initWithName:name andFirstBoard:board] autorelease];
|
114
|
+
}
|
115
|
+
|
116
|
+
+ (BeeUIStack *)stackWithFirstBoardClass:(Class)clazz
|
117
|
+
{
|
118
|
+
return [BeeUIStack stack:nil firstBoardClass:clazz];
|
119
|
+
}
|
120
|
+
|
121
|
+
+ (BeeUIStack *)stackWithFirstBoard:(BeeUIBoard *)board
|
122
|
+
{
|
123
|
+
return [BeeUIStack stack:nil firstBoard:board];
|
124
|
+
}
|
125
|
+
|
126
|
+
- (BeeUIStack *)initWithName:(NSString *)name andFirstBoardClass:(Class)clazz
|
127
|
+
{
|
128
|
+
BeeUIBoard * board = [[(BeeUIBoard *)[BeeRuntime allocByClass:clazz] init] autorelease];
|
129
|
+
self = [super initWithRootViewController:board];
|
130
|
+
if ( self )
|
131
|
+
{
|
132
|
+
self.name = name ? name : [clazz description];
|
133
|
+
self.navigationBarHidden = YES;
|
134
|
+
}
|
135
|
+
return self;
|
136
|
+
}
|
137
|
+
|
138
|
+
- (BeeUIStack *)initWithName:(NSString *)name andFirstBoard:(BeeUIBoard *)board
|
139
|
+
{
|
140
|
+
self = [super initWithRootViewController:board];
|
141
|
+
if ( self )
|
142
|
+
{
|
143
|
+
self.name = name ? name : [[board class] description];
|
144
|
+
self.navigationBarHidden = YES;
|
145
|
+
}
|
146
|
+
return self;
|
147
|
+
}
|
148
|
+
|
149
|
+
- (void)dealloc
|
150
|
+
{
|
151
|
+
[_name release];
|
152
|
+
[super dealloc];
|
153
|
+
}
|
154
|
+
|
155
|
+
- (NSArray *)boards
|
156
|
+
{
|
157
|
+
NSMutableArray * array = [NSMutableArray array];
|
158
|
+
|
159
|
+
for ( UIViewController * controller in self.viewControllers )
|
160
|
+
{
|
161
|
+
if ( [controller isKindOfClass:[BeeUIBoard class]] )
|
162
|
+
{
|
163
|
+
[array addObject:controller];
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
return array;
|
168
|
+
}
|
169
|
+
|
170
|
+
- (BeeUIBoard *)topBoard
|
171
|
+
{
|
172
|
+
UIViewController * controller = self.topViewController;
|
173
|
+
if ( controller && [controller isKindOfClass:[BeeUIBoard class]] )
|
174
|
+
{
|
175
|
+
BeeUIBoard * board = (BeeUIBoard *)controller;
|
176
|
+
UNUSED(board.view);
|
177
|
+
return board;
|
178
|
+
}
|
179
|
+
else
|
180
|
+
{
|
181
|
+
return nil;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
- (void)pushBoard:(BeeUIBoard *)board animated:(BOOL)animated
|
186
|
+
{
|
187
|
+
[self pushBoard:board animated:animated animationType:BeeUIStack.ANIMATION_TYPE_DEFAULT];
|
188
|
+
}
|
189
|
+
|
190
|
+
- (void)pushBoard:(BeeUIBoard *)newBoard animated:(BOOL)animated animationType:(NSInteger)type
|
191
|
+
{
|
192
|
+
newBoard.containedPopover = self.topBoard.containedPopover;
|
193
|
+
newBoard.stackAnimationType = type;
|
194
|
+
|
195
|
+
if ( NO == animated )
|
196
|
+
{
|
197
|
+
[super pushViewController:newBoard animated:NO];
|
198
|
+
}
|
199
|
+
else
|
200
|
+
{
|
201
|
+
if ( BeeUIStack.ANIMATION_TYPE_DEFAULT == type )
|
202
|
+
{
|
203
|
+
[super pushViewController:newBoard animated:YES];
|
204
|
+
}
|
205
|
+
else if ( BeeUIStack.ANIMATION_TYPE_CUBE == type )
|
206
|
+
{
|
207
|
+
CATransition *animation = [CATransition animation];
|
208
|
+
[animation setDuration:0.6f];
|
209
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
|
210
|
+
[animation setType:@"cube"];
|
211
|
+
[animation setRemovedOnCompletion:YES];
|
212
|
+
[animation setSubtype:kCATransitionFromTop];
|
213
|
+
[self.view.layer addAnimation:animation forKey:@"cube"];
|
214
|
+
|
215
|
+
[super pushViewController:newBoard animated:NO];
|
216
|
+
}
|
217
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FADE == type )
|
218
|
+
{
|
219
|
+
CATransition *animation = [CATransition animation];
|
220
|
+
[animation setDuration:0.6f];
|
221
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
|
222
|
+
[animation setType:@"fade"];
|
223
|
+
[animation setSubtype:kCATransitionFromRight];
|
224
|
+
[animation setRemovedOnCompletion:YES];
|
225
|
+
|
226
|
+
[self.view.layer addAnimation:animation forKey:@"fade"];
|
227
|
+
|
228
|
+
[super pushViewController:newBoard animated:NO];
|
229
|
+
}
|
230
|
+
else if ( BeeUIStack.ANIMATION_TYPE_PAGING == type )
|
231
|
+
{
|
232
|
+
CATransition * animation = [CATransition animation];
|
233
|
+
[animation setDuration:0.6f];
|
234
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
|
235
|
+
[animation setType:kCATransitionReveal];
|
236
|
+
[animation setSubtype:kCATransitionFromTop];
|
237
|
+
[animation setRemovedOnCompletion:YES];
|
238
|
+
|
239
|
+
[self.view.layer removeAnimationForKey:@"paging_in"];
|
240
|
+
[self.view.layer addAnimation:animation forKey:@"paging_in"];
|
241
|
+
|
242
|
+
[super pushViewController:newBoard animated:NO];
|
243
|
+
|
244
|
+
newBoard.view.layer.transform = CATransform3DMakeScale( 0.9f, 0.9f, 1.0f );
|
245
|
+
newBoard.view.alpha = 0.0f;
|
246
|
+
|
247
|
+
[UIView beginAnimations:nil context:nil];
|
248
|
+
[UIView setAnimationDuration:0.6f];
|
249
|
+
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
|
250
|
+
[UIView setAnimationBeginsFromCurrentState:NO];
|
251
|
+
|
252
|
+
newBoard.view.layer.transform = CATransform3DIdentity;
|
253
|
+
newBoard.view.alpha = 1.0f;
|
254
|
+
|
255
|
+
[UIView commitAnimations];
|
256
|
+
}
|
257
|
+
else if ( BeeUIStack.ANIMATION_TYPE_SLIDE == type )
|
258
|
+
{
|
259
|
+
CATransition * animation = [CATransition animation];
|
260
|
+
[animation setDuration:0.6f];
|
261
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
|
262
|
+
[animation setType:kCATransitionPush];
|
263
|
+
[animation setSubtype:kCATransitionFromTop];
|
264
|
+
[animation setRemovedOnCompletion:YES];
|
265
|
+
[self.view.layer removeAnimationForKey:@"slide_in"];
|
266
|
+
[self.view.layer addAnimation:animation forKey:@"slide_in"];
|
267
|
+
|
268
|
+
[super pushViewController:newBoard animated:NO];
|
269
|
+
}
|
270
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FLIP == type )
|
271
|
+
{
|
272
|
+
CATransition *animation = [CATransition animation];
|
273
|
+
animation.duration = 0.6f;
|
274
|
+
animation.timingFunction = UIViewAnimationCurveEaseInOut;
|
275
|
+
animation.fillMode = kCAFillModeForwards;
|
276
|
+
animation.type = @"flip";
|
277
|
+
animation.subtype = @"fromLeft";
|
278
|
+
animation.startProgress = 0.0f;
|
279
|
+
animation.endProgress = 1.0f;
|
280
|
+
animation.removedOnCompletion = YES;
|
281
|
+
[self.view.layer removeAnimationForKey:@"flip"];
|
282
|
+
[self.view.layer addAnimation:animation forKey:@"flip"];
|
283
|
+
|
284
|
+
[super pushViewController:newBoard animated:NO];
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
UNUSED(newBoard.view); // load view
|
289
|
+
}
|
290
|
+
|
291
|
+
- (void)popBoardAnimated:(BOOL)animated
|
292
|
+
{
|
293
|
+
[self popBoardAnimated:animated animationType:self.topBoard.stackAnimationType];
|
294
|
+
}
|
295
|
+
|
296
|
+
- (void)popBoardAnimated:(BOOL)animated animationType:(NSInteger)animType
|
297
|
+
{
|
298
|
+
if ( self.boards.count <= 1 )
|
299
|
+
return;
|
300
|
+
|
301
|
+
if ( NO == animated )
|
302
|
+
{
|
303
|
+
[super popViewControllerAnimated:NO];
|
304
|
+
}
|
305
|
+
else
|
306
|
+
{
|
307
|
+
if ( BeeUIStack.ANIMATION_TYPE_DEFAULT == animType )
|
308
|
+
{
|
309
|
+
[super popViewControllerAnimated:YES];
|
310
|
+
}
|
311
|
+
else if ( BeeUIStack.ANIMATION_TYPE_CUBE == animType )
|
312
|
+
{
|
313
|
+
[super popViewControllerAnimated:NO];
|
314
|
+
|
315
|
+
CATransition *animation = [CATransition animation];
|
316
|
+
[animation setDuration:0.6f];
|
317
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
318
|
+
[animation setType:@"cube"];
|
319
|
+
[animation setRemovedOnCompletion:YES];
|
320
|
+
[animation setSubtype:kCATransitionFromBottom];
|
321
|
+
|
322
|
+
[self.view.layer addAnimation:animation forKey:@"cube"];
|
323
|
+
}
|
324
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FADE == animType )
|
325
|
+
{
|
326
|
+
[super popViewControllerAnimated:NO];
|
327
|
+
|
328
|
+
CATransition *animation = [CATransition animation];
|
329
|
+
[animation setDuration:0.6f];
|
330
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
331
|
+
[animation setType:@"fade"];
|
332
|
+
[animation setSubtype:kCATransitionFromLeft];
|
333
|
+
[animation setRemovedOnCompletion:YES];
|
334
|
+
|
335
|
+
[self.view.layer addAnimation:animation forKey:@"fade"];
|
336
|
+
}
|
337
|
+
else if ( BeeUIStack.ANIMATION_TYPE_PAGING == animType )
|
338
|
+
{
|
339
|
+
UIView * topView = [self.topBoard.view retain];
|
340
|
+
[super popViewControllerAnimated:NO];
|
341
|
+
UIView * bottomView = self.topBoard.view;
|
342
|
+
|
343
|
+
[topView removeFromSuperview];
|
344
|
+
[self.view addSubview:topView];
|
345
|
+
|
346
|
+
bottomView.layer.transform = CATransform3DMakeTranslation( 0.0f, -bottomView.bounds.size.height, 0.0f);
|
347
|
+
bottomView.alpha = 1.0f;
|
348
|
+
|
349
|
+
[UIView animateWithDuration:0.4f
|
350
|
+
animations:^{
|
351
|
+
bottomView.layer.transform = CATransform3DIdentity;
|
352
|
+
bottomView.alpha = 1.0f;
|
353
|
+
|
354
|
+
topView.layer.transform = CATransform3DMakeScale( 0.9f, 0.9f, 1.0f );
|
355
|
+
topView.alpha = 0.0f;
|
356
|
+
}
|
357
|
+
completion:^(BOOL finished) {
|
358
|
+
topView.alpha = 0.0f;
|
359
|
+
topView.layer.transform = CATransform3DIdentity;
|
360
|
+
|
361
|
+
[topView removeFromSuperview];
|
362
|
+
[topView release];
|
363
|
+
}];
|
364
|
+
}
|
365
|
+
else if ( BeeUIStack.ANIMATION_TYPE_SLIDE == animType )
|
366
|
+
{
|
367
|
+
[super popViewControllerAnimated:NO];
|
368
|
+
|
369
|
+
CATransition * animation = [CATransition animation];
|
370
|
+
[animation setDuration:0.6f];
|
371
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
372
|
+
[animation setType:kCATransitionPush];
|
373
|
+
[animation setSubtype:kCATransitionFromBottom];
|
374
|
+
[animation setRemovedOnCompletion:YES];
|
375
|
+
|
376
|
+
[self.view.layer addAnimation:animation forKey:@"slide_out"];
|
377
|
+
}
|
378
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FLIP == animType )
|
379
|
+
{
|
380
|
+
[super popViewControllerAnimated:NO];
|
381
|
+
|
382
|
+
CATransition *animation = [CATransition animation];
|
383
|
+
animation.delegate = self;
|
384
|
+
animation.duration = 0.6f;
|
385
|
+
animation.timingFunction = UIViewAnimationCurveEaseInOut;
|
386
|
+
animation.fillMode = kCAFillModeForwards;
|
387
|
+
animation.type = @"flip";
|
388
|
+
animation.subtype = @"fromRight";
|
389
|
+
animation.startProgress = 0.0f;
|
390
|
+
animation.endProgress = 1.0f;
|
391
|
+
animation.removedOnCompletion = NO;
|
392
|
+
[self.view.layer removeAnimationForKey:@"flip"];
|
393
|
+
[self.view.layer addAnimation:animation forKey:@"flip"];
|
394
|
+
}
|
395
|
+
}
|
396
|
+
}
|
397
|
+
|
398
|
+
- (NSArray *)popToBoard:(BeeUIBoard *)board animated:(BOOL)animated
|
399
|
+
{
|
400
|
+
return [self popToBoard:board animated:animated animationType:self.topBoard.stackAnimationType];
|
401
|
+
}
|
402
|
+
|
403
|
+
- (NSArray *)popToBoard:(BeeUIBoard *)board animated:(BOOL)animated animationType:(NSInteger)animType
|
404
|
+
{
|
405
|
+
NSArray * result = nil;
|
406
|
+
|
407
|
+
if ( NO == animated )
|
408
|
+
{
|
409
|
+
result = [super popToViewController:board animated:NO];
|
410
|
+
}
|
411
|
+
else
|
412
|
+
{
|
413
|
+
if ( BeeUIStack.ANIMATION_TYPE_DEFAULT == animType )
|
414
|
+
{
|
415
|
+
result = [super popToViewController:board animated:YES];
|
416
|
+
}
|
417
|
+
else if ( BeeUIStack.ANIMATION_TYPE_CUBE == animType )
|
418
|
+
{
|
419
|
+
result = [super popToViewController:board animated:NO];
|
420
|
+
|
421
|
+
CATransition *animation = [CATransition animation];
|
422
|
+
[animation setDuration:0.6f];
|
423
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
424
|
+
[animation setType:@"cube"];
|
425
|
+
[animation setRemovedOnCompletion:YES];
|
426
|
+
[animation setSubtype:kCATransitionFromTop];
|
427
|
+
|
428
|
+
[self.view.layer addAnimation:animation forKey:@"cube"];
|
429
|
+
}
|
430
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FADE == animType )
|
431
|
+
{
|
432
|
+
result = [super popToViewController:board animated:NO];
|
433
|
+
|
434
|
+
CATransition *animation = [CATransition animation];
|
435
|
+
[animation setDuration:0.6f];
|
436
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
437
|
+
[animation setType:@"fade"];
|
438
|
+
[animation setSubtype:kCATransitionFromLeft];
|
439
|
+
[animation setRemovedOnCompletion:YES];
|
440
|
+
|
441
|
+
[self.view.layer addAnimation:animation forKey:@"fade"];
|
442
|
+
}
|
443
|
+
else if ( BeeUIStack.ANIMATION_TYPE_PAGING == animType )
|
444
|
+
{
|
445
|
+
UIView * topView = [self.topBoard.view retain];
|
446
|
+
result = [super popToViewController:board animated:NO];
|
447
|
+
UIView * bottomView = self.topBoard.view;
|
448
|
+
|
449
|
+
[topView removeFromSuperview];
|
450
|
+
[self.view addSubview:topView];
|
451
|
+
|
452
|
+
bottomView.layer.transform = CATransform3DMakeTranslation( 0.0f, -bottomView.bounds.size.height, 0.0f);
|
453
|
+
bottomView.alpha = 1.0f;
|
454
|
+
|
455
|
+
[UIView animateWithDuration:0.4f
|
456
|
+
animations:^{
|
457
|
+
bottomView.layer.transform = CATransform3DIdentity;
|
458
|
+
bottomView.alpha = 1.0f;
|
459
|
+
|
460
|
+
topView.layer.transform = CATransform3DMakeScale( 0.9f, 0.9f, 1.0f );
|
461
|
+
topView.alpha = 0.0f;
|
462
|
+
}
|
463
|
+
completion:^(BOOL finished) {
|
464
|
+
topView.alpha = 0.0f;
|
465
|
+
topView.layer.transform = CATransform3DIdentity;
|
466
|
+
|
467
|
+
[topView removeFromSuperview];
|
468
|
+
[topView release];
|
469
|
+
}];
|
470
|
+
}
|
471
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FLIP == animType )
|
472
|
+
{
|
473
|
+
|
474
|
+
}
|
475
|
+
}
|
476
|
+
|
477
|
+
return result;
|
478
|
+
}
|
479
|
+
|
480
|
+
- (NSArray *)popToFirstBoardAnimated:(BOOL)animated
|
481
|
+
{
|
482
|
+
return [self popToFirstBoardAnimated:animated animationType:self.topBoard.stackAnimationType];
|
483
|
+
}
|
484
|
+
|
485
|
+
- (NSArray *)popToFirstBoardAnimated:(BOOL)animated animationType:(NSInteger)animType
|
486
|
+
{
|
487
|
+
NSArray * result = nil;
|
488
|
+
|
489
|
+
if ( NO == animated )
|
490
|
+
{
|
491
|
+
result = [super popToRootViewControllerAnimated:NO];
|
492
|
+
}
|
493
|
+
else
|
494
|
+
{
|
495
|
+
if ( BeeUIStack.ANIMATION_TYPE_DEFAULT == animType )
|
496
|
+
{
|
497
|
+
result = [super popToRootViewControllerAnimated:YES];
|
498
|
+
}
|
499
|
+
else if ( BeeUIStack.ANIMATION_TYPE_CUBE == animType )
|
500
|
+
{
|
501
|
+
result = [super popToRootViewControllerAnimated:NO];
|
502
|
+
|
503
|
+
CATransition *animation = [CATransition animation];
|
504
|
+
[animation setDuration:0.6f];
|
505
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
506
|
+
[animation setType:@"cube"];
|
507
|
+
[animation setRemovedOnCompletion:YES];
|
508
|
+
[animation setSubtype:kCATransitionFromTop];
|
509
|
+
|
510
|
+
[self.view.layer addAnimation:animation forKey:@"cube"];
|
511
|
+
}
|
512
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FADE == animType )
|
513
|
+
{
|
514
|
+
result = [super popToRootViewControllerAnimated:NO];
|
515
|
+
|
516
|
+
CATransition *animation = [CATransition animation];
|
517
|
+
[animation setDuration:0.6f];
|
518
|
+
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
|
519
|
+
[animation setType:@"fade"];
|
520
|
+
[animation setSubtype:kCATransitionFromLeft];
|
521
|
+
[animation setRemovedOnCompletion:YES];
|
522
|
+
|
523
|
+
[self.view.layer addAnimation:animation forKey:@"fade"];
|
524
|
+
}
|
525
|
+
else if ( BeeUIStack.ANIMATION_TYPE_PAGING == animType )
|
526
|
+
{
|
527
|
+
UIView * topView = [self.topBoard.view retain];
|
528
|
+
result = [super popToRootViewControllerAnimated:NO];
|
529
|
+
UIView * bottomView = self.topBoard.view;
|
530
|
+
|
531
|
+
[topView removeFromSuperview];
|
532
|
+
[self.view addSubview:topView];
|
533
|
+
|
534
|
+
bottomView.layer.transform = CATransform3DMakeTranslation( 0.0f, -bottomView.bounds.size.height, 0.0f);
|
535
|
+
bottomView.alpha = 1.0f;
|
536
|
+
|
537
|
+
[UIView animateWithDuration:0.4f
|
538
|
+
animations:^{
|
539
|
+
bottomView.layer.transform = CATransform3DIdentity;
|
540
|
+
bottomView.alpha = 1.0f;
|
541
|
+
|
542
|
+
topView.layer.transform = CATransform3DMakeScale( 0.9f, 0.9f, 1.0f );
|
543
|
+
topView.alpha = 0.0f;
|
544
|
+
}
|
545
|
+
completion:^(BOOL finished) {
|
546
|
+
topView.alpha = 0.0f;
|
547
|
+
topView.layer.transform = CATransform3DIdentity;
|
548
|
+
|
549
|
+
[topView removeFromSuperview];
|
550
|
+
[topView release];
|
551
|
+
}];
|
552
|
+
}
|
553
|
+
else if ( BeeUIStack.ANIMATION_TYPE_FLIP == animType )
|
554
|
+
{
|
555
|
+
|
556
|
+
}
|
557
|
+
}
|
558
|
+
|
559
|
+
return result;
|
560
|
+
}
|
561
|
+
|
562
|
+
- (void)popAllBoards
|
563
|
+
{
|
564
|
+
self.viewControllers = [NSArray array];
|
565
|
+
}
|
566
|
+
|
567
|
+
- (BOOL)existsBoard:(BeeUIBoard *)board
|
568
|
+
{
|
569
|
+
for ( UIViewController * controller in self.viewControllers )
|
570
|
+
{
|
571
|
+
if ( [controller isKindOfClass:[BeeUIBoard class]] && (BeeUIBoard *)controller == board )
|
572
|
+
{
|
573
|
+
return YES;
|
574
|
+
}
|
575
|
+
}
|
576
|
+
|
577
|
+
return NO;
|
578
|
+
}
|
579
|
+
|
580
|
+
- (BeeUIBoard *)getBoard:(Class)clazz
|
581
|
+
{
|
582
|
+
for ( UIViewController * controller in self.viewControllers )
|
583
|
+
{
|
584
|
+
if ( [controller isKindOfClass:clazz] )
|
585
|
+
{
|
586
|
+
return (BeeUIBoard *)controller;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
|
590
|
+
return nil;
|
591
|
+
}
|
592
|
+
|
593
|
+
- (void)__enterBackground
|
594
|
+
{
|
595
|
+
for ( UIViewController * viewController in self.viewControllers )
|
596
|
+
{
|
597
|
+
if ( [viewController isKindOfClass:[BeeUIBoard class]] )
|
598
|
+
{
|
599
|
+
BeeUIBoard * board = (BeeUIBoard *)viewController;
|
600
|
+
[board __enterBackground];
|
601
|
+
}
|
602
|
+
}
|
603
|
+
}
|
604
|
+
|
605
|
+
- (void)__enterForeground
|
606
|
+
{
|
607
|
+
for ( UIViewController * viewController in self.viewControllers )
|
608
|
+
{
|
609
|
+
if ( [viewController isKindOfClass:[BeeUIBoard class]] )
|
610
|
+
{
|
611
|
+
BeeUIBoard * board = (BeeUIBoard *)viewController;
|
612
|
+
[board __enterForeground];
|
613
|
+
}
|
614
|
+
}
|
615
|
+
}
|
616
|
+
|
617
|
+
- (void)loadView
|
618
|
+
{
|
619
|
+
[super loadView];
|
620
|
+
|
621
|
+
BeeUINavigationBar * bar = [[BeeUINavigationBar alloc] init];
|
622
|
+
bar.navigationController = self;
|
623
|
+
[self setValue:bar forKey:@"navigationBar"];
|
624
|
+
[bar release];
|
625
|
+
}
|
626
|
+
|
627
|
+
// Called when the view is about to made visible. Default does nothing
|
628
|
+
- (void)viewWillAppear:(BOOL)animated
|
629
|
+
{
|
630
|
+
[super viewWillAppear:animated];
|
631
|
+
|
632
|
+
if ( self.topViewController && [self.topViewController isKindOfClass:[BeeUIBoard class]] )
|
633
|
+
{
|
634
|
+
BeeUIBoard * board = (BeeUIBoard *)self.topViewController;
|
635
|
+
[board viewWillAppear:animated];
|
636
|
+
}
|
637
|
+
}
|
638
|
+
|
639
|
+
// Called when the view has been fully transitioned onto the screen. Default does nothing
|
640
|
+
- (void)viewDidAppear:(BOOL)animated
|
641
|
+
{
|
642
|
+
[super viewDidAppear:animated];
|
643
|
+
|
644
|
+
if ( self.topViewController && [self.topViewController isKindOfClass:[BeeUIBoard class]] )
|
645
|
+
{
|
646
|
+
BeeUIBoard * board = (BeeUIBoard *)self.topViewController;
|
647
|
+
[board viewDidAppear:animated];
|
648
|
+
}
|
649
|
+
}
|
650
|
+
|
651
|
+
// Called when the view is dismissed, covered or otherwise hidden. Default does nothing
|
652
|
+
- (void)viewWillDisappear:(BOOL)animated
|
653
|
+
{
|
654
|
+
[super viewWillDisappear:animated];
|
655
|
+
|
656
|
+
if ( self.topViewController && [self.topViewController isKindOfClass:[BeeUIBoard class]] )
|
657
|
+
{
|
658
|
+
BeeUIBoard * board = (BeeUIBoard *)self.topViewController;
|
659
|
+
[board viewWillDisappear:animated];
|
660
|
+
}
|
661
|
+
}
|
662
|
+
|
663
|
+
// Called after the view was dismissed, covered or otherwise hidden. Default does nothing
|
664
|
+
- (void)viewDidDisappear:(BOOL)animated
|
665
|
+
{
|
666
|
+
[super viewDidDisappear:animated];
|
667
|
+
|
668
|
+
if ( self.topViewController && [self.topViewController isKindOfClass:[BeeUIBoard class]] )
|
669
|
+
{
|
670
|
+
BeeUIBoard * board = (BeeUIBoard *)self.topViewController;
|
671
|
+
[board viewDidDisappear:animated];
|
672
|
+
}
|
673
|
+
}
|
674
|
+
|
675
|
+
- (void)handleUISignal:(BeeUISignal *)signal
|
676
|
+
{
|
677
|
+
if ( signal.source != self )
|
678
|
+
{
|
679
|
+
BeeUIBoard * board = self.topBoard;
|
680
|
+
if ( board )
|
681
|
+
{
|
682
|
+
[signal forward:board];
|
683
|
+
}
|
684
|
+
return;
|
685
|
+
}
|
686
|
+
else
|
687
|
+
{
|
688
|
+
// TODO: 自己发给自己的
|
689
|
+
}
|
690
|
+
}
|
691
|
+
|
692
|
+
@end
|
693
|
+
|
694
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|