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,911 @@
|
|
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_UITipsView.m
|
31
|
+
//
|
32
|
+
|
33
|
+
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
34
|
+
|
35
|
+
#import <QuartzCore/QuartzCore.h>
|
36
|
+
#import "Bee_UITipsView.h"
|
37
|
+
#import "Bee_UIKeyboard.h"
|
38
|
+
#import "UIView+BeeExtension.h"
|
39
|
+
#import "UIImage+BeeExtension.h"
|
40
|
+
#import "NSObject+BeeNotification.h"
|
41
|
+
#import "UIView+BeeUISignal.h"
|
42
|
+
|
43
|
+
#define DEFAULT_TIPS_BUBBLE_WIDTH (160.0f)
|
44
|
+
#define DEFAULT_TIPS_BUBBLE_HEIGHT (140.0f)
|
45
|
+
#define DEFAULT_TIMEOUT_SECONDS (1.0f)
|
46
|
+
#define ANIMATION_DURATION (0.3f)
|
47
|
+
|
48
|
+
#pragma mark -
|
49
|
+
|
50
|
+
@implementation NSObject(BeeUITipsView)
|
51
|
+
|
52
|
+
- (BeeUITipsView *)presentingTips
|
53
|
+
{
|
54
|
+
return [BeeUITipsCenter sharedInstance].tipsAppear;
|
55
|
+
}
|
56
|
+
|
57
|
+
- (BeeUITipsView *)presentMessageTips:(NSString *)message
|
58
|
+
{
|
59
|
+
UIView * container = nil;
|
60
|
+
|
61
|
+
if ( [self isKindOfClass:[UIView class]] )
|
62
|
+
{
|
63
|
+
container = (UIView *)self;
|
64
|
+
}
|
65
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
66
|
+
{
|
67
|
+
container = ((UIViewController *)self).view;
|
68
|
+
}
|
69
|
+
|
70
|
+
return [[BeeUITipsCenter sharedInstance] presentMessageTips:message inView:container];
|
71
|
+
}
|
72
|
+
|
73
|
+
- (BeeUITipsView *)presentSuccessTips:(NSString *)message
|
74
|
+
{
|
75
|
+
UIView * container = nil;
|
76
|
+
|
77
|
+
if ( [self isKindOfClass:[UIView class]] )
|
78
|
+
{
|
79
|
+
container = (UIView *)self;
|
80
|
+
}
|
81
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
82
|
+
{
|
83
|
+
container = ((UIViewController *)self).view;
|
84
|
+
}
|
85
|
+
|
86
|
+
return [[BeeUITipsCenter sharedInstance] presentSuccessTips:message inView:container];
|
87
|
+
}
|
88
|
+
|
89
|
+
- (BeeUITipsView *)presentFailureTips:(NSString *)message
|
90
|
+
{
|
91
|
+
UIView * container = nil;
|
92
|
+
|
93
|
+
if ( [self isKindOfClass:[UIView class]] )
|
94
|
+
{
|
95
|
+
container = (UIView *)self;
|
96
|
+
}
|
97
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
98
|
+
{
|
99
|
+
container = ((UIViewController *)self).view;
|
100
|
+
}
|
101
|
+
|
102
|
+
return [[BeeUITipsCenter sharedInstance] presentFailureTips:message inView:container];
|
103
|
+
}
|
104
|
+
|
105
|
+
- (BeeUITipsView *)presentLoadingTips:(NSString *)message
|
106
|
+
{
|
107
|
+
UIView * container = nil;
|
108
|
+
|
109
|
+
if ( [self isKindOfClass:[UIView class]] )
|
110
|
+
{
|
111
|
+
container = (UIView *)self;
|
112
|
+
}
|
113
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
114
|
+
{
|
115
|
+
container = ((UIViewController *)self).view;
|
116
|
+
}
|
117
|
+
|
118
|
+
return [[BeeUITipsCenter sharedInstance] presentLoadingTips:message inView:container];
|
119
|
+
}
|
120
|
+
|
121
|
+
- (BeeUITipsView *)presentProgressTips:(NSString *)message
|
122
|
+
{
|
123
|
+
UIView * container = nil;
|
124
|
+
|
125
|
+
if ( [self isKindOfClass:[UIView class]] )
|
126
|
+
{
|
127
|
+
container = (UIView *)self;
|
128
|
+
}
|
129
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
130
|
+
{
|
131
|
+
container = ((UIViewController *)self).view;
|
132
|
+
}
|
133
|
+
|
134
|
+
return [[BeeUITipsCenter sharedInstance] presentProgressTips:message inView:container];
|
135
|
+
}
|
136
|
+
|
137
|
+
- (void)dismissTips
|
138
|
+
{
|
139
|
+
UIView * container = nil;
|
140
|
+
|
141
|
+
if ( [self isKindOfClass:[UIView class]] )
|
142
|
+
{
|
143
|
+
container = (UIView *)self;
|
144
|
+
}
|
145
|
+
else if ( [self isKindOfClass:[UIViewController class]] )
|
146
|
+
{
|
147
|
+
container = ((UIViewController *)self).view;
|
148
|
+
}
|
149
|
+
|
150
|
+
return [[BeeUITipsCenter sharedInstance] dismissTipsByOwner:container];
|
151
|
+
}
|
152
|
+
|
153
|
+
@end
|
154
|
+
|
155
|
+
#pragma mark -
|
156
|
+
|
157
|
+
@interface BeeUITipsCenter(Private)
|
158
|
+
- (void)presentTips:(BeeUITipsView *)tips inView:(UIView *)view;
|
159
|
+
- (void)dismissTips;
|
160
|
+
- (void)dismissTipsByOwner:(UIView *)parentView;
|
161
|
+
- (void)dismissTipsLoading;
|
162
|
+
- (void)performDismissTips;
|
163
|
+
- (void)didAppearingAnimationDone;
|
164
|
+
- (void)didDisappearingAnimationDone;
|
165
|
+
- (void)bounce1ForAppearingAnimationStopped;
|
166
|
+
- (void)bounce2ForAppearingAnimationStopped;
|
167
|
+
@end
|
168
|
+
|
169
|
+
@interface BeeUITipsView(Private)
|
170
|
+
- (void)didTimeout;
|
171
|
+
- (void)internalWillAppear;
|
172
|
+
- (void)internalDidAppear;
|
173
|
+
- (void)internalWillDisappear;
|
174
|
+
- (void)internalDidDisappear;
|
175
|
+
- (void)internalRelayout:(UIView *)parentView;
|
176
|
+
@end
|
177
|
+
|
178
|
+
#pragma mark -
|
179
|
+
|
180
|
+
@implementation BeeUITipsCenter
|
181
|
+
|
182
|
+
DEF_SINGLETON( BeeUITipsCenter )
|
183
|
+
|
184
|
+
@synthesize defaultContainerView = _defaultContainerView;
|
185
|
+
|
186
|
+
@synthesize maskView = _maskView;
|
187
|
+
@synthesize tipsAppear = _tipsAppear;
|
188
|
+
@synthesize tipsDisappear = _tipsDisappear;
|
189
|
+
|
190
|
+
@synthesize bubble = _bubble;
|
191
|
+
@synthesize messageIcon = _messageIcon;
|
192
|
+
@synthesize successIcon = _successIcon;
|
193
|
+
@synthesize failureIcon = _failureIcon;
|
194
|
+
|
195
|
+
+ (void)setDefaultContainerView:(UIView *)view
|
196
|
+
{
|
197
|
+
[BeeUITipsCenter sharedInstance].defaultContainerView = view;
|
198
|
+
}
|
199
|
+
|
200
|
+
+ (void)setDefaultMessageIcon:(UIImage *)image
|
201
|
+
{
|
202
|
+
[BeeUITipsCenter sharedInstance].messageIcon = image;
|
203
|
+
}
|
204
|
+
|
205
|
+
+ (void)setDefaultSuccessIcon:(UIImage *)image
|
206
|
+
{
|
207
|
+
[BeeUITipsCenter sharedInstance].successIcon = image;
|
208
|
+
}
|
209
|
+
|
210
|
+
+ (void)setDefaultFailureIcon:(UIImage *)image
|
211
|
+
{
|
212
|
+
[BeeUITipsCenter sharedInstance].failureIcon = image;
|
213
|
+
}
|
214
|
+
|
215
|
+
+ (void)setDefaultBubble:(UIImage *)image
|
216
|
+
{
|
217
|
+
[BeeUITipsCenter sharedInstance].bubble = image;
|
218
|
+
}
|
219
|
+
|
220
|
+
- (id)init
|
221
|
+
{
|
222
|
+
self = [super init];
|
223
|
+
if ( self )
|
224
|
+
{
|
225
|
+
_defaultContainerView = nil;
|
226
|
+
_tipsAppear = nil;
|
227
|
+
_tipsDisappear = nil;
|
228
|
+
|
229
|
+
_maskView = [[UIButton alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
230
|
+
_maskView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.05f];
|
231
|
+
|
232
|
+
[self observeNotification:BeeUIKeyboard.SHOWN];
|
233
|
+
[self observeNotification:BeeUIKeyboard.HIDDEN];
|
234
|
+
[self observeNotification:BeeUIKeyboard.HEIGHT_CHANGED];
|
235
|
+
}
|
236
|
+
|
237
|
+
return self;
|
238
|
+
}
|
239
|
+
|
240
|
+
- (void)dealloc
|
241
|
+
{
|
242
|
+
[self unobserveAllNotifications];
|
243
|
+
|
244
|
+
[_tipsAppear release];
|
245
|
+
[_tipsDisappear release];
|
246
|
+
|
247
|
+
[_bubble release];
|
248
|
+
[_messageIcon release];
|
249
|
+
[_failureIcon release];
|
250
|
+
[_successIcon release];
|
251
|
+
|
252
|
+
[super dealloc];
|
253
|
+
}
|
254
|
+
|
255
|
+
- (void)handleNotification:(NSNotification *)notification
|
256
|
+
{
|
257
|
+
if ( [notification is:BeeUIKeyboard.SHOWN] || [notification is:BeeUIKeyboard.HEIGHT_CHANGED] )
|
258
|
+
{
|
259
|
+
[UIView beginAnimations:nil context:NULL];
|
260
|
+
[UIView setAnimationDuration:0.2f];
|
261
|
+
[_tipsAppear internalRelayout:_tipsAppear.superview];
|
262
|
+
[_tipsDisappear internalRelayout:_tipsDisappear.superview];
|
263
|
+
[UIView commitAnimations];
|
264
|
+
}
|
265
|
+
else if ( [notification is:BeeUIKeyboard.HIDDEN] )
|
266
|
+
{
|
267
|
+
[UIView beginAnimations:nil context:NULL];
|
268
|
+
[UIView setAnimationDuration:0.2f];
|
269
|
+
[_tipsAppear internalRelayout:_tipsAppear.superview];
|
270
|
+
[_tipsDisappear internalRelayout:_tipsDisappear.superview];
|
271
|
+
[UIView commitAnimations];
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
- (void)presentTipsView:(BeeUITipsView *)tips inView:(UIView *)view
|
276
|
+
{
|
277
|
+
if ( nil != _tipsAppear )
|
278
|
+
{
|
279
|
+
if ( tips == _tipsAppear )
|
280
|
+
return;
|
281
|
+
|
282
|
+
if ( NO == _tipsAppear.interrupt )
|
283
|
+
return;
|
284
|
+
}
|
285
|
+
|
286
|
+
if ( nil == view )
|
287
|
+
{
|
288
|
+
view = _defaultContainerView;
|
289
|
+
|
290
|
+
if ( nil == view )
|
291
|
+
{
|
292
|
+
view = [UIApplication sharedApplication].keyWindow;
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
[tips internalRelayout:view];
|
297
|
+
|
298
|
+
tips.backgroundColor = [UIColor clearColor];
|
299
|
+
|
300
|
+
self.tipsDisappear = self.tipsAppear;
|
301
|
+
self.tipsAppear = tips;
|
302
|
+
|
303
|
+
[_maskView removeFromSuperview];
|
304
|
+
[view addSubview:_maskView];
|
305
|
+
[view bringSubviewToFront:_maskView];
|
306
|
+
|
307
|
+
_maskView.frame = view.bounds;
|
308
|
+
|
309
|
+
[view addSubview:_tipsAppear];
|
310
|
+
[view bringSubviewToFront:_tipsAppear];
|
311
|
+
|
312
|
+
// animation 1
|
313
|
+
|
314
|
+
_tipsAppear.alpha = 0.0f;
|
315
|
+
|
316
|
+
[UIView beginAnimations:nil context:NULL];
|
317
|
+
[UIView setAnimationBeginsFromCurrentState:YES];
|
318
|
+
[UIView setAnimationDuration:ANIMATION_DURATION];
|
319
|
+
[UIView setAnimationDelegate:self];
|
320
|
+
[UIView setAnimationDidStopSelector:@selector(didAppearingAnimationDone)];
|
321
|
+
|
322
|
+
_tipsAppear.alpha = 1.0f;
|
323
|
+
_tipsDisappear.alpha = 0.0f;
|
324
|
+
_maskView.alpha = _tipsAppear.useMask ? 1.0f : 0.0f;
|
325
|
+
|
326
|
+
[UIView commitAnimations];
|
327
|
+
|
328
|
+
// animation 2
|
329
|
+
|
330
|
+
if ( _tipsAppear.useScaling )
|
331
|
+
{
|
332
|
+
_tipsAppear.transform = CGAffineTransformMakeScale( 1.2f, 1.2f );
|
333
|
+
|
334
|
+
[UIView beginAnimations:nil context:NULL];
|
335
|
+
[UIView setAnimationDuration:ANIMATION_DURATION];
|
336
|
+
[UIView setAnimationBeginsFromCurrentState:YES];
|
337
|
+
|
338
|
+
_tipsAppear.transform = CGAffineTransformMakeScale( 1.0f, 1.0f );
|
339
|
+
_tipsDisappear.transform = CGAffineTransformMakeScale( 0.8f, 0.8f );
|
340
|
+
|
341
|
+
[UIView commitAnimations];
|
342
|
+
}
|
343
|
+
|
344
|
+
// animation 3
|
345
|
+
|
346
|
+
if ( _tipsAppear.useBounces )
|
347
|
+
{
|
348
|
+
_tipsAppear.transform = CGAffineTransformScale( CGAffineTransformIdentity, 0.001, 0.001 );
|
349
|
+
|
350
|
+
[UIView beginAnimations:nil context:nil];
|
351
|
+
[UIView setAnimationDuration:(ANIMATION_DURATION / 1.5)];
|
352
|
+
[UIView setAnimationDelegate:self];
|
353
|
+
[UIView setAnimationDidStopSelector:@selector(bounce1ForAppearingAnimationStopped)];
|
354
|
+
|
355
|
+
_tipsAppear.transform = CGAffineTransformScale( CGAffineTransformIdentity, 1.1f, 1.1f );
|
356
|
+
|
357
|
+
[UIView commitAnimations];
|
358
|
+
}
|
359
|
+
|
360
|
+
[_tipsAppear internalWillAppear];
|
361
|
+
[_tipsDisappear internalWillDisappear];
|
362
|
+
}
|
363
|
+
|
364
|
+
- (void)didAppearingAnimationDone
|
365
|
+
{
|
366
|
+
if ( NO == _tipsAppear.useMask )
|
367
|
+
{
|
368
|
+
_maskView.alpha = 0.0f;
|
369
|
+
[_maskView removeFromSuperview];
|
370
|
+
}
|
371
|
+
|
372
|
+
[_tipsDisappear removeFromSuperview];
|
373
|
+
_tipsDisappear = nil;
|
374
|
+
|
375
|
+
[_tipsAppear internalDidAppear];
|
376
|
+
[_tipsDisappear internalDidDisappear];
|
377
|
+
}
|
378
|
+
|
379
|
+
- (void)bounce1ForAppearingAnimationStopped
|
380
|
+
{
|
381
|
+
[UIView beginAnimations:nil context:nil];
|
382
|
+
[UIView setAnimationDuration:(ANIMATION_DURATION / 2.0f)];
|
383
|
+
[UIView setAnimationDelegate:self];
|
384
|
+
[UIView setAnimationDidStopSelector:@selector(bounce2ForAppearingAnimationStopped)];
|
385
|
+
|
386
|
+
_tipsAppear.transform = CGAffineTransformScale( CGAffineTransformIdentity, 0.9, 0.9 );
|
387
|
+
|
388
|
+
[UIView commitAnimations];
|
389
|
+
}
|
390
|
+
|
391
|
+
- (void)bounce2ForAppearingAnimationStopped
|
392
|
+
{
|
393
|
+
[UIView beginAnimations:nil context:nil];
|
394
|
+
[UIView setAnimationDuration:(ANIMATION_DURATION / 2.0f)];
|
395
|
+
|
396
|
+
_tipsAppear.transform = CGAffineTransformIdentity;
|
397
|
+
|
398
|
+
[UIView commitAnimations];
|
399
|
+
}
|
400
|
+
|
401
|
+
- (void)dismissTips
|
402
|
+
{
|
403
|
+
[self performDismissTips];
|
404
|
+
}
|
405
|
+
|
406
|
+
- (void)dismissTipsByOwner:(UIView *)parentView
|
407
|
+
{
|
408
|
+
if ( _tipsAppear && _tipsAppear.superview == parentView )
|
409
|
+
{
|
410
|
+
[self performDismissTips];
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
- (void)performDismissTips
|
415
|
+
{
|
416
|
+
if ( nil == _tipsAppear )
|
417
|
+
return;
|
418
|
+
|
419
|
+
self.tipsDisappear = self.tipsAppear;
|
420
|
+
self.tipsAppear = nil;
|
421
|
+
|
422
|
+
[UIView beginAnimations:nil context:NULL];
|
423
|
+
[UIView setAnimationDuration:0.3f];
|
424
|
+
[UIView setAnimationDelegate:self];
|
425
|
+
[UIView setAnimationDidStopSelector:@selector(didDisappearingAnimationDone)];
|
426
|
+
|
427
|
+
_tipsDisappear.alpha = 0.0f;
|
428
|
+
|
429
|
+
if ( _tipsDisappear.useScaling )
|
430
|
+
{
|
431
|
+
_tipsDisappear.transform = CGAffineTransformMakeScale( 0.8f, 0.8f );
|
432
|
+
}
|
433
|
+
|
434
|
+
_maskView.alpha = 0.0f;
|
435
|
+
|
436
|
+
[UIView commitAnimations];
|
437
|
+
|
438
|
+
[_tipsAppear internalWillAppear];
|
439
|
+
[_tipsDisappear internalWillDisappear];
|
440
|
+
}
|
441
|
+
|
442
|
+
- (void)didDisappearingAnimationDone
|
443
|
+
{
|
444
|
+
if ( NO == _tipsAppear.useMask )
|
445
|
+
{
|
446
|
+
_maskView.alpha = 0.0f;
|
447
|
+
[_maskView removeFromSuperview];
|
448
|
+
}
|
449
|
+
|
450
|
+
[_tipsDisappear removeFromSuperview];
|
451
|
+
_tipsDisappear = nil;
|
452
|
+
|
453
|
+
[_tipsAppear internalDidAppear];
|
454
|
+
[_tipsDisappear internalDidDisappear];
|
455
|
+
}
|
456
|
+
|
457
|
+
- (BeeUITipsView *)presentMessageTips:(NSString *)message inView:(UIView *)view
|
458
|
+
{
|
459
|
+
BeeUIMessageTipsView * tips = [[BeeUIMessageTipsView alloc] init];
|
460
|
+
tips.iconView.image = _messageIcon;
|
461
|
+
tips.labelView.text = message;
|
462
|
+
[tips presentInView:view];
|
463
|
+
return [tips autorelease];
|
464
|
+
}
|
465
|
+
|
466
|
+
- (BeeUITipsView *)presentSuccessTips:(NSString *)message inView:(UIView *)view
|
467
|
+
{
|
468
|
+
BeeUIMessageTipsView * tips = [[BeeUIMessageTipsView alloc] init];
|
469
|
+
tips.iconView.image = _successIcon;
|
470
|
+
tips.labelView.text = message;
|
471
|
+
[tips presentInView:view];
|
472
|
+
return [tips autorelease];
|
473
|
+
}
|
474
|
+
|
475
|
+
- (BeeUITipsView *)presentFailureTips:(NSString *)message inView:(UIView *)view
|
476
|
+
{
|
477
|
+
BeeUIMessageTipsView * tips = [[BeeUIMessageTipsView alloc] init];
|
478
|
+
tips.iconView.image = _failureIcon;
|
479
|
+
tips.labelView.text = message;
|
480
|
+
[tips presentInView:view];
|
481
|
+
return [tips autorelease];
|
482
|
+
}
|
483
|
+
|
484
|
+
- (BeeUITipsView *)presentLoadingTips:(NSString *)message inView:(UIView *)view
|
485
|
+
{
|
486
|
+
BeeUILoadingTipsView * tips = [[BeeUILoadingTipsView alloc] init];
|
487
|
+
tips.labelView.text = message;
|
488
|
+
[tips presentInView:view];
|
489
|
+
[tips.indicator startAnimating];
|
490
|
+
return [tips autorelease];
|
491
|
+
}
|
492
|
+
|
493
|
+
- (BeeUITipsView *)presentProgressTips:(NSString *)message inView:(UIView *)view
|
494
|
+
{
|
495
|
+
BeeUIProgressTipsView * tips = [[BeeUIProgressTipsView alloc] init];
|
496
|
+
tips.labelView.text = message;
|
497
|
+
[tips presentInView:view];
|
498
|
+
[tips updateProgress:0.0f];
|
499
|
+
return [tips autorelease];
|
500
|
+
}
|
501
|
+
|
502
|
+
@end
|
503
|
+
|
504
|
+
#pragma mark -
|
505
|
+
|
506
|
+
@implementation BeeUITipsView
|
507
|
+
|
508
|
+
@synthesize timerSeconds = _timerSeconds;
|
509
|
+
|
510
|
+
@synthesize useMask = _useMask;
|
511
|
+
@synthesize useScaling = _useScaling;
|
512
|
+
@synthesize useBounces = _useBounces;
|
513
|
+
@synthesize interrupt = _interrupt;
|
514
|
+
@synthesize timeLimit = _timeLimit;
|
515
|
+
@synthesize exclusive = _exclusive;
|
516
|
+
@synthesize fullScreen = _fullScreen;
|
517
|
+
|
518
|
+
DEF_SIGNAL( WILL_APPEAR );
|
519
|
+
DEF_SIGNAL( DID_APPEAR );
|
520
|
+
DEF_SIGNAL( WILL_DISAPPEAR );
|
521
|
+
DEF_SIGNAL( DID_DISAPPEAR );
|
522
|
+
|
523
|
+
- (id)init
|
524
|
+
{
|
525
|
+
self = [super initWithFrame:CGRectZero];
|
526
|
+
if ( self )
|
527
|
+
{
|
528
|
+
self.backgroundColor = [UIColor clearColor];
|
529
|
+
self.timerSeconds = DEFAULT_TIMEOUT_SECONDS;
|
530
|
+
self.timeLimit = YES;
|
531
|
+
self.interrupt = YES;
|
532
|
+
self.fullScreen = NO;
|
533
|
+
// self.useScaling = YES;
|
534
|
+
// self.useBounces = YES;
|
535
|
+
}
|
536
|
+
|
537
|
+
return self;
|
538
|
+
}
|
539
|
+
|
540
|
+
- (void)dealloc
|
541
|
+
{
|
542
|
+
[_timer invalidate];
|
543
|
+
_timer = nil;
|
544
|
+
|
545
|
+
[super dealloc];
|
546
|
+
}
|
547
|
+
|
548
|
+
- (void)internalWillAppear
|
549
|
+
{
|
550
|
+
[_timer invalidate];
|
551
|
+
_timer = nil;
|
552
|
+
|
553
|
+
[self sendUISignal:BeeUITipsView.WILL_APPEAR];
|
554
|
+
}
|
555
|
+
|
556
|
+
- (void)internalDidAppear
|
557
|
+
{
|
558
|
+
[_timer invalidate];
|
559
|
+
_timer = nil;
|
560
|
+
|
561
|
+
if ( _timeLimit )
|
562
|
+
{
|
563
|
+
_timer = [NSTimer scheduledTimerWithTimeInterval:self.timerSeconds
|
564
|
+
target:self
|
565
|
+
selector:@selector(dismiss)
|
566
|
+
userInfo:nil
|
567
|
+
repeats:NO];
|
568
|
+
}
|
569
|
+
|
570
|
+
[self sendUISignal:BeeUITipsView.DID_APPEAR];
|
571
|
+
}
|
572
|
+
|
573
|
+
- (void)internalWillDisappear
|
574
|
+
{
|
575
|
+
[_timer invalidate];
|
576
|
+
_timer = nil;
|
577
|
+
|
578
|
+
[self sendUISignal:BeeUITipsView.WILL_DISAPPEAR];
|
579
|
+
}
|
580
|
+
|
581
|
+
- (void)internalDidDisappear
|
582
|
+
{
|
583
|
+
[self sendUISignal:BeeUITipsView.DID_DISAPPEAR];
|
584
|
+
}
|
585
|
+
|
586
|
+
- (void)internalRelayout:(UIView *)parentView
|
587
|
+
{
|
588
|
+
if ( _fullScreen )
|
589
|
+
{
|
590
|
+
self.frame = parentView.bounds;
|
591
|
+
}
|
592
|
+
else
|
593
|
+
{
|
594
|
+
CGRect bound = parentView.bounds;
|
595
|
+
|
596
|
+
if ( [BeeUIKeyboard sharedInstance].shown )
|
597
|
+
{
|
598
|
+
bound.size.height -= [BeeUIKeyboard sharedInstance].height;
|
599
|
+
}
|
600
|
+
|
601
|
+
// bound.origin.y += 44.0f;
|
602
|
+
bound.size.height -= 44.0f;
|
603
|
+
bound.size.height -= 20.0f;
|
604
|
+
|
605
|
+
CGRect viewFrame;
|
606
|
+
viewFrame.origin.x = bound.origin.x + (bound.size.width - DEFAULT_TIPS_BUBBLE_WIDTH) / 2.0f;
|
607
|
+
viewFrame.origin.y = bound.origin.y + (bound.size.height - DEFAULT_TIPS_BUBBLE_HEIGHT) / 2.0f;
|
608
|
+
viewFrame.size.width = DEFAULT_TIPS_BUBBLE_WIDTH;
|
609
|
+
viewFrame.size.height = DEFAULT_TIPS_BUBBLE_HEIGHT;
|
610
|
+
|
611
|
+
self.frame = viewFrame;
|
612
|
+
}
|
613
|
+
}
|
614
|
+
|
615
|
+
- (void)presentInView:(UIView *)view
|
616
|
+
{
|
617
|
+
[[BeeUITipsCenter sharedInstance] presentTipsView:self inView:view];
|
618
|
+
}
|
619
|
+
|
620
|
+
- (void)present
|
621
|
+
{
|
622
|
+
[[BeeUITipsCenter sharedInstance] presentTipsView:self inView:nil];
|
623
|
+
}
|
624
|
+
|
625
|
+
- (void)dismiss
|
626
|
+
{
|
627
|
+
[_timer invalidate];
|
628
|
+
_timer = nil;
|
629
|
+
|
630
|
+
[[BeeUITipsCenter sharedInstance] dismissTips];
|
631
|
+
}
|
632
|
+
|
633
|
+
@end
|
634
|
+
|
635
|
+
#pragma mark -
|
636
|
+
|
637
|
+
@implementation BeeUIMessageTipsView
|
638
|
+
|
639
|
+
@synthesize bubbleView = _bubbleView;
|
640
|
+
@synthesize iconView = _iconView;
|
641
|
+
@synthesize labelView = _labelView;
|
642
|
+
|
643
|
+
- (id)init
|
644
|
+
{
|
645
|
+
self = [super init];
|
646
|
+
if ( self )
|
647
|
+
{
|
648
|
+
self.useMask = YES;
|
649
|
+
self.interrupt = YES;
|
650
|
+
self.exclusive = NO;
|
651
|
+
self.timeLimit = YES;
|
652
|
+
self.timerSeconds = DEFAULT_TIMEOUT_SECONDS;
|
653
|
+
|
654
|
+
_bubbleView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
655
|
+
_bubbleView.backgroundColor = [UIColor clearColor];
|
656
|
+
_bubbleView.contentMode = UIViewContentModeCenter;
|
657
|
+
if ( [BeeUITipsCenter sharedInstance].bubble )
|
658
|
+
{
|
659
|
+
_bubbleView.image = [BeeUITipsCenter sharedInstance].bubble.stretched;
|
660
|
+
}
|
661
|
+
else
|
662
|
+
{
|
663
|
+
_bubbleView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6f];
|
664
|
+
_bubbleView.layer.masksToBounds = YES;
|
665
|
+
_bubbleView.layer.cornerRadius = 4.0f;
|
666
|
+
}
|
667
|
+
[self addSubview:_bubbleView];
|
668
|
+
|
669
|
+
_iconView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
670
|
+
_iconView.backgroundColor = [UIColor clearColor];
|
671
|
+
_iconView.contentMode = UIViewContentModeCenter;
|
672
|
+
[self addSubview:_iconView];
|
673
|
+
|
674
|
+
_labelView = [[UILabel alloc] initWithFrame:CGRectZero];
|
675
|
+
_labelView.font = [UIFont boldSystemFontOfSize:14.0f];
|
676
|
+
_labelView.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
|
677
|
+
_labelView.textAlignment = UITextAlignmentCenter;
|
678
|
+
_labelView.textColor = [UIColor whiteColor];
|
679
|
+
_labelView.backgroundColor = [UIColor clearColor];
|
680
|
+
_labelView.lineBreakMode = UILineBreakModeClip;
|
681
|
+
_labelView.numberOfLines = 2;
|
682
|
+
[self addSubview:_labelView];
|
683
|
+
}
|
684
|
+
|
685
|
+
return self;
|
686
|
+
}
|
687
|
+
|
688
|
+
- (void)dealloc
|
689
|
+
{
|
690
|
+
SAFE_RELEASE_SUBVIEW( _bubbleView );
|
691
|
+
SAFE_RELEASE_SUBVIEW( _iconView );
|
692
|
+
SAFE_RELEASE_SUBVIEW( _labelView );
|
693
|
+
|
694
|
+
[super dealloc];
|
695
|
+
}
|
696
|
+
|
697
|
+
- (void)internalRelayout:(UIView *)parentView
|
698
|
+
{
|
699
|
+
[super internalRelayout:parentView];
|
700
|
+
|
701
|
+
_bubbleView.frame = self.bounds;
|
702
|
+
|
703
|
+
if ( _iconView.image )
|
704
|
+
{
|
705
|
+
CGRect iconFrame = self.bounds;
|
706
|
+
iconFrame.size.height -= 20.0f;
|
707
|
+
_iconView.frame = iconFrame;
|
708
|
+
|
709
|
+
CGRect labelFrame;
|
710
|
+
labelFrame.size.width = self.bounds.size.width;
|
711
|
+
labelFrame.size.height = 60.0f;
|
712
|
+
labelFrame.origin.x = 0.0f;
|
713
|
+
labelFrame.origin.y = self.bounds.size.height - labelFrame.size.height;
|
714
|
+
_labelView.frame = CGRectInset(labelFrame, 5.0f, 0.0f);
|
715
|
+
}
|
716
|
+
else
|
717
|
+
{
|
718
|
+
_labelView.frame = CGRectInset(self.bounds, 5.0f, 0.0f);
|
719
|
+
}
|
720
|
+
}
|
721
|
+
|
722
|
+
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
723
|
+
{
|
724
|
+
[super touchesBegan:touches withEvent:event];
|
725
|
+
|
726
|
+
[self dismiss];
|
727
|
+
}
|
728
|
+
|
729
|
+
@end
|
730
|
+
|
731
|
+
#pragma mark -
|
732
|
+
|
733
|
+
@implementation BeeUILoadingTipsView
|
734
|
+
|
735
|
+
@synthesize bubbleView = _bubbleView;
|
736
|
+
@synthesize labelView = _labelView;
|
737
|
+
@synthesize indicator = _indicator;
|
738
|
+
|
739
|
+
- (id)init
|
740
|
+
{
|
741
|
+
self = [super init];
|
742
|
+
if ( self )
|
743
|
+
{
|
744
|
+
self.useMask = YES;
|
745
|
+
self.interrupt = NO;
|
746
|
+
self.exclusive = YES;
|
747
|
+
self.timeLimit = NO;
|
748
|
+
|
749
|
+
_bubbleView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
750
|
+
_bubbleView.backgroundColor = [UIColor clearColor];
|
751
|
+
_bubbleView.contentMode = UIViewContentModeCenter;
|
752
|
+
if ( [BeeUITipsCenter sharedInstance].bubble )
|
753
|
+
{
|
754
|
+
_bubbleView.image = [BeeUITipsCenter sharedInstance].bubble.stretched;
|
755
|
+
}
|
756
|
+
else
|
757
|
+
{
|
758
|
+
_bubbleView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6f];
|
759
|
+
_bubbleView.layer.masksToBounds = YES;
|
760
|
+
_bubbleView.layer.cornerRadius = 4.0f;
|
761
|
+
}
|
762
|
+
[self addSubview:_bubbleView];
|
763
|
+
|
764
|
+
_indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectZero];
|
765
|
+
_indicator.backgroundColor = [UIColor clearColor];
|
766
|
+
[self addSubview:_indicator];
|
767
|
+
|
768
|
+
_labelView = [[UILabel alloc] initWithFrame:CGRectZero];
|
769
|
+
_labelView.font = [UIFont boldSystemFontOfSize:14.0f];
|
770
|
+
_labelView.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
|
771
|
+
_labelView.textAlignment = UITextAlignmentCenter;
|
772
|
+
_labelView.textColor = [UIColor whiteColor];
|
773
|
+
_labelView.backgroundColor = [UIColor clearColor];
|
774
|
+
_labelView.lineBreakMode = UILineBreakModeClip;
|
775
|
+
_labelView.numberOfLines = 2;
|
776
|
+
[self addSubview:_labelView];
|
777
|
+
}
|
778
|
+
|
779
|
+
return self;
|
780
|
+
}
|
781
|
+
|
782
|
+
- (void)dealloc
|
783
|
+
{
|
784
|
+
SAFE_RELEASE_SUBVIEW( _bubbleView );
|
785
|
+
SAFE_RELEASE_SUBVIEW( _indicator );
|
786
|
+
SAFE_RELEASE_SUBVIEW( _labelView );
|
787
|
+
|
788
|
+
[super dealloc];
|
789
|
+
}
|
790
|
+
|
791
|
+
- (void)internalRelayout:(UIView *)parentView
|
792
|
+
{
|
793
|
+
[super internalRelayout:parentView];
|
794
|
+
|
795
|
+
_bubbleView.frame = self.bounds;
|
796
|
+
|
797
|
+
CGRect indicatorFrame;
|
798
|
+
indicatorFrame.size.width = 14.0f;
|
799
|
+
indicatorFrame.size.height = 14.0f;
|
800
|
+
indicatorFrame.origin.x = (self.bounds.size.width - indicatorFrame.size.width) / 2.0f;
|
801
|
+
indicatorFrame.origin.y = (self.bounds.size.height - indicatorFrame.size.height) / 2.0f;
|
802
|
+
_indicator.frame = indicatorFrame;
|
803
|
+
|
804
|
+
CGRect labelFrame;
|
805
|
+
labelFrame.size.width = self.bounds.size.width;
|
806
|
+
labelFrame.size.height = 60.0f;
|
807
|
+
labelFrame.origin.x = 0.0f;
|
808
|
+
labelFrame.origin.y = self.bounds.size.height - labelFrame.size.height;
|
809
|
+
_labelView.frame = CGRectInset(labelFrame, 5.0f, 0.0f);
|
810
|
+
}
|
811
|
+
|
812
|
+
@end
|
813
|
+
|
814
|
+
#pragma mark -
|
815
|
+
|
816
|
+
@implementation BeeUIProgressTipsView
|
817
|
+
|
818
|
+
@synthesize bubbleView = _bubbleView;
|
819
|
+
@synthesize indicator = _indicator;
|
820
|
+
@synthesize labelView = _labelView;
|
821
|
+
|
822
|
+
- (id)init
|
823
|
+
{
|
824
|
+
self = [super init];
|
825
|
+
if ( self )
|
826
|
+
{
|
827
|
+
self.useMask = YES;
|
828
|
+
self.interrupt = NO;
|
829
|
+
self.exclusive = YES;
|
830
|
+
self.timeLimit = NO;
|
831
|
+
|
832
|
+
_bubbleView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
833
|
+
_bubbleView.backgroundColor = [UIColor clearColor];
|
834
|
+
_bubbleView.contentMode = UIViewContentModeCenter;
|
835
|
+
if ( [BeeUITipsCenter sharedInstance].bubble )
|
836
|
+
{
|
837
|
+
_bubbleView.image = [BeeUITipsCenter sharedInstance].bubble.stretched;
|
838
|
+
}
|
839
|
+
else
|
840
|
+
{
|
841
|
+
_bubbleView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6f];
|
842
|
+
_bubbleView.layer.masksToBounds = YES;
|
843
|
+
_bubbleView.layer.cornerRadius = 4.0f;
|
844
|
+
}
|
845
|
+
[self addSubview:_bubbleView];
|
846
|
+
|
847
|
+
_indicator = [[UIProgressView alloc] initWithFrame:CGRectZero];
|
848
|
+
_indicator.backgroundColor = [UIColor clearColor];
|
849
|
+
[self addSubview:_indicator];
|
850
|
+
|
851
|
+
_labelView = [[UILabel alloc] initWithFrame:CGRectZero];
|
852
|
+
_labelView.font = [UIFont boldSystemFontOfSize:14.0f];
|
853
|
+
_labelView.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
|
854
|
+
_labelView.textAlignment = UITextAlignmentCenter;
|
855
|
+
_labelView.textColor = [UIColor whiteColor];
|
856
|
+
_labelView.backgroundColor = [UIColor clearColor];
|
857
|
+
_labelView.lineBreakMode = UILineBreakModeClip;
|
858
|
+
_labelView.numberOfLines = 2;
|
859
|
+
[self addSubview:_labelView];
|
860
|
+
}
|
861
|
+
|
862
|
+
return self;
|
863
|
+
}
|
864
|
+
|
865
|
+
- (void)dealloc
|
866
|
+
{
|
867
|
+
SAFE_RELEASE_SUBVIEW( _bubbleView );
|
868
|
+
SAFE_RELEASE_SUBVIEW( _indicator );
|
869
|
+
SAFE_RELEASE_SUBVIEW( _labelView );
|
870
|
+
|
871
|
+
[super dealloc];
|
872
|
+
}
|
873
|
+
|
874
|
+
- (void)updateProgress:(float)p
|
875
|
+
{
|
876
|
+
if ( p <= 0.0f )
|
877
|
+
{
|
878
|
+
_indicator.hidden = YES;
|
879
|
+
}
|
880
|
+
else
|
881
|
+
{
|
882
|
+
_indicator.hidden = NO;
|
883
|
+
}
|
884
|
+
|
885
|
+
_indicator.progress = p;;
|
886
|
+
}
|
887
|
+
|
888
|
+
- (void)internalRelayout:(UIView *)parentView
|
889
|
+
{
|
890
|
+
[super internalRelayout:parentView];
|
891
|
+
|
892
|
+
_bubbleView.frame = self.bounds;
|
893
|
+
|
894
|
+
CGRect indicatorRect;
|
895
|
+
indicatorRect.size.width = self.bounds.size.width - 40.0f;
|
896
|
+
indicatorRect.size.height = 20.0f;
|
897
|
+
indicatorRect.origin.x = (self.bounds.size.width - indicatorRect.size.width) / 2.0f;
|
898
|
+
indicatorRect.origin.y = (self.bounds.size.height - 20.0f - 20.0f) / 2.0f;
|
899
|
+
_indicator.frame = indicatorRect;
|
900
|
+
|
901
|
+
CGRect labelFrame;
|
902
|
+
labelFrame.size.width = self.bounds.size.width;
|
903
|
+
labelFrame.size.height = 60.0f;
|
904
|
+
labelFrame.origin.x = 0.0f;
|
905
|
+
labelFrame.origin.y = self.bounds.size.height - labelFrame.size.height;
|
906
|
+
_labelView.frame = CGRectInset(labelFrame, 5.0f, 0.0f);
|
907
|
+
}
|
908
|
+
|
909
|
+
@end
|
910
|
+
|
911
|
+
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|