Commit 365ac2ab authored by Achilles's avatar Achilles

add swipe gesture

parent b156608d
...@@ -77,7 +77,7 @@ ON_CREATE_VIEWS( signal ) ...@@ -77,7 +77,7 @@ ON_CREATE_VIEWS( signal )
self.list.total = 1; self.list.total = 1;
BeeUIScrollItem * item = self.list.items[0]; BeeUIScrollItem * item = self.list.items[0];
item.size = CGSizeMake( self.list.width, 100 ); item.size = CGSizeMake( self.list.width, 150 );
item.order = 0; item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall; item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [NoDataCell_iPhoneCell class]; item.clazz = [NoDataCell_iPhoneCell class];
......
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
#import "GEToast.h" #import "GEToast.h"
@interface VankeMainBoard_iPhone () @interface VankeMainBoard_iPhone ()
//@property (strong, nonatomic) VankeServiceDashBoard_iPhone *communityDashBoard;
//@property (strong, nonatomic) VankeServiceDashBoard_iPhone *centerDashBoard;
//@property (strong, nonatomic) VankeServiceDashBoard_iPhone *squreDashBoard;
@property (strong, nonatomic) VankeServiceDashBoard_iPhone *currDashBoard; @property (strong, nonatomic) VankeServiceDashBoard_iPhone *currDashBoard;
@end @end
...@@ -56,10 +53,10 @@ ON_CREATE_VIEWS( signal ) ...@@ -56,10 +53,10 @@ ON_CREATE_VIEWS( signal )
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
[self addLeftIconToTextField:_txtQuery icon:@"search"]; [self addLeftIconToTextField:_txtQuery icon:@"search"];
[_weatherBoard reloadLocationAndWeather]; [_weatherBoard reloadLocationAndWeather];
[self initSwipeGesture]; self.view.swipeDirection = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight;
self.view.swipeble = YES;
} }
ON_DELETE_VIEWS( signal ) ON_DELETE_VIEWS( signal )
{ {
} }
...@@ -70,7 +67,7 @@ ON_LAYOUT_VIEWS( signal ) ...@@ -70,7 +67,7 @@ ON_LAYOUT_VIEWS( signal )
ON_WILL_APPEAR( signal ) ON_WILL_APPEAR( signal )
{ {
[BeeUIRouter sharedInstance].view.pannable = YES; [BeeUIRouter sharedInstance].view.pannable = NO;
self.navigationBarShown = NO; self.navigationBarShown = NO;
[[VankeAppBoard_iPhone sharedInstance] showMenu]; [[VankeAppBoard_iPhone sharedInstance] showMenu];
[_summaryModel reload]; [_summaryModel reload];
...@@ -248,35 +245,17 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -248,35 +245,17 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
return [df stringFromDate:[NSDate date]]; return [df stringFromDate:[NSDate date]];
} }
#pragma SwipeGesture #pragma VankeMainBoard_iPhone
-(void) initSwipeGesture {
UISwipeGestureRecognizer *swipeGestureRecognizerToLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipesToLeft:)];
/*Swipes that are performed from right to left are to be detected*/
swipeGestureRecognizerToLeft.direction = UISwipeGestureRecognizerDirectionLeft;
/*just one finger needed*/
swipeGestureRecognizerToLeft.numberOfTouchesRequired = 1;
swipeGestureRecognizerToLeft.cancelsTouchesInView = NO;
/*add it to the view*/
[self.serviceDashBoardView addGestureRecognizer:swipeGestureRecognizerToLeft];
UISwipeGestureRecognizer *swipeGestureRecognizerToRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipesToRight:)];
/*Swipes that are performed from right to left are to be detected*/
swipeGestureRecognizerToRight.direction = UISwipeGestureRecognizerDirectionRight;
/*just one finger needed*/
swipeGestureRecognizerToRight.numberOfTouchesRequired = 1;
swipeGestureRecognizerToRight.cancelsTouchesInView = NO;
/*add it to the view*/
[self.serviceDashBoardView addGestureRecognizer:swipeGestureRecognizerToRight];
}
-(void)handleSwipesToLeft:(UISwipeGestureRecognizer *)paramSender { ON_SIGNAL3( VankeMainBoard_iPhone, SWIPE_LEFT, signal )
{
if (_curTopMenuIndex > 0) { if (_curTopMenuIndex > 0) {
[self showTab:_curTopMenuIndex - 1]; [self showTab:_curTopMenuIndex - 1];
} }
} }
-(void)handleSwipesToRight:(UISwipeGestureRecognizer *)paramSender { ON_SIGNAL3( VankeMainBoard_iPhone, SWIPE_RIGHT, signal )
{
if (_curTopMenuIndex < 2) { if (_curTopMenuIndex < 2) {
[self showTab:_curTopMenuIndex + 1]; [self showTab:_curTopMenuIndex + 1];
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#import "ICRAboutViewController.h" #import "ICRAboutViewController.h"
#import "ICRAppMacro.h" #import "ICRAppMacro.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "GEToast.h"
#import "VankeCommonModel.h" #import "VankeCommonModel.h"
#define TAG_ACTION_SHEET_EXIT 0 #define TAG_ACTION_SHEET_EXIT 0
...@@ -135,6 +136,16 @@ ON_DID_APPEAR( signal ) ...@@ -135,6 +136,16 @@ ON_DID_APPEAR( signal )
cellInfo.fCellHeight = fCellHeight; cellInfo.fCellHeight = fCellHeight;
[secInfo addCell:cellInfo]; [secInfo addCell:cellInfo];
// 检查版本更新
cellInfo =
[IBTTableViewCellInfo normalCellForSel:@selector(onCheckNewVersion:) target:self
title:@"检查版本更新"
rightValue:nil
accessoryType:UITableViewCellAccessoryDisclosureIndicator];
[cellInfo addUserInfoValue:titleColor forKey:CInfoTitleColorKey];
cellInfo.fCellHeight = fCellHeight;
[secInfo addCell:cellInfo];
[self.m_tableViewInfo addSection:secInfo]; [self.m_tableViewInfo addSection:secInfo];
} }
...@@ -178,6 +189,11 @@ ON_DID_APPEAR( signal ) ...@@ -178,6 +189,11 @@ ON_DID_APPEAR( signal )
[self.stack pushBoard:board animated:YES]; [self.stack pushBoard:board animated:YES];
} }
- (void) onCheckNewVersion: (__unused id)sender {
// TODO
[GEToast showWithText:@"当前已经是最新版本了" bottomOffset:45.0f duration:1.0f];
}
-(void) confirmToLogout { -(void) confirmToLogout {
UIActionSheet *as=[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"退出登录" otherButtonTitles:@"退出应用", nil ]; UIActionSheet *as=[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"退出登录" otherButtonTitles:@"退出应用", nil ];
as.tag = TAG_ACTION_SHEET_EXIT; as.tag = TAG_ACTION_SHEET_EXIT;
......
...@@ -296,7 +296,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) { ...@@ -296,7 +296,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) {
self.list.total = 1; self.list.total = 1;
BeeUIScrollItem * item = self.list.items[0]; BeeUIScrollItem * item = self.list.items[0];
item.size = CGSizeMake( self.list.width, 100); item.size = CGSizeMake( self.list.width, 150);
item.order = 0; item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall; item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [NoDataCell_iPhoneCell class]; item.clazz = [NoDataCell_iPhoneCell class];
......
...@@ -27,9 +27,8 @@ ...@@ -27,9 +27,8 @@
<linear orientation="h" class="col-body"> <linear orientation="h" class="col-body">
<linear orientation="h" class="row"> <linear orientation="h" class="row">
<linear orientation="h" class="row1-wrapper"> <linear orientation="h" class="row1-wrapper">
<label class="lbl"></label>
<label id="lblCount" class="lbl"></label> <label id="lblCount" class="lbl"></label>
<label class="lbl">家商铺</label> <label class="lbl">家商铺:</label>
<label id="lblTotalPrefix" class="lbl">应收总额</label> <label id="lblTotalPrefix" class="lbl">应收总额</label>
</linear> </linear>
</linear> </linear>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment