Commit 2c319d5c authored by Achilles's avatar Achilles

allowedswiptoback

parent 4c5c8b09
...@@ -47,8 +47,7 @@ DEF_OUTLET( BeeUIScrollView, list ); ...@@ -47,8 +47,7 @@ DEF_OUTLET( BeeUIScrollView, list );
ON_CREATE_VIEWS( signal ) ON_CREATE_VIEWS( signal )
{ {
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
self.allowedSwipeToBack = YES;
// self.allowedSwipeToBack = YES;
self.navigationBarShown = YES; self.navigationBarShown = YES;
self.navigationBarTitle = self.data.projectName; self.navigationBarTitle = self.data.projectName;
......
...@@ -60,6 +60,8 @@ ON_CREATE_VIEWS( signal ) ...@@ -60,6 +60,8 @@ ON_CREATE_VIEWS( signal )
[self addLeftIconToTextField:_txtQuery icon:@"search"]; [self addLeftIconToTextField:_txtQuery icon:@"search"];
self.allowedSwipeToBack = YES;
self.list.headerClass = [PullLoader class]; self.list.headerClass = [PullLoader class];
self.list.headerShown = YES; self.list.headerShown = YES;
......
...@@ -53,6 +53,18 @@ ON_CREATE_VIEWS( signal ) ...@@ -53,6 +53,18 @@ 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];
UISwipeGestureRecognizer *swipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipes:)];
/*Swipes that are performed from right to left are to be detected*/
swipeGestureRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;
/*just one finger needed*/
swipeGestureRecognizer.numberOfTouchesRequired = 1;
/*add it to the view*/
[self.view addGestureRecognizer:swipeGestureRecognizer];
}
-(void)handleSwipes:(UISwipeGestureRecognizer *)paramSender{
NSLog(@"swipe to left");
} }
ON_DELETE_VIEWS( signal ) ON_DELETE_VIEWS( signal )
...@@ -177,10 +189,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -177,10 +189,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.communityDashBoard == nil) { if (self.communityDashBoard == nil) {
self.communityDashBoard = [VankeServiceDashBoard_iPhone communityDashBarod]; self.communityDashBoard = [VankeServiceDashBoard_iPhone communityDashBarod];
self.communityDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
} }
if (self.currDashBoard != nil) { if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0); self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
[self.currDashBoard removeFromSuperview]; [self.currDashBoard removeFromSuperview];
} }
...@@ -209,10 +222,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -209,10 +222,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.centerDashBoard == nil) { if (self.centerDashBoard == nil) {
self.centerDashBoard = [VankeServiceDashBoard_iPhone centerDashBarod]; self.centerDashBoard = [VankeServiceDashBoard_iPhone centerDashBarod];
self.centerDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
} }
if (self.currDashBoard != nil) { if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0); self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
[self.currDashBoard removeFromSuperview]; [self.currDashBoard removeFromSuperview];
} }
...@@ -242,10 +256,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -242,10 +256,11 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.squreDashBoard == nil) { if (self.squreDashBoard == nil) {
self.squreDashBoard = [VankeServiceDashBoard_iPhone squreDashBarod]; self.squreDashBoard = [VankeServiceDashBoard_iPhone squreDashBarod];
// self.squreDashBoard.frame = CGRectMake(frame.size.height/2, frame.size.height/2, frame.size.width, 0);
} }
if (self.currDashBoard != nil) { if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0); self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
[self.currDashBoard removeFromSuperview]; [self.currDashBoard removeFromSuperview];
} }
......
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