|
@@ -47,16 +47,17 @@
|
|
|
- (void)viewDidAppear:(BOOL)animated{
|
|
|
[super viewDidAppear:animated];
|
|
|
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self startMoveView];
|
|
|
- });
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+// [self startMoveView];
|
|
|
+// });
|
|
|
}
|
|
|
|
|
|
- (void)startMoveView{
|
|
|
|
|
|
- CGFloat x = bgScrView.contentOffset.x;
|
|
|
- NSInteger index = (x+1)/self.view.width;
|
|
|
- if (index >= 4){
|
|
|
+// CGFloat x = bgScrView.contentOffset.x;
|
|
|
+// NSInteger index = (x+1)/self.view.width;
|
|
|
+// if (index >= 4)
|
|
|
+ {
|
|
|
/*记录已经用户引导*/
|
|
|
[HWDataManager setBoolWithKey:Const_Have_Show_Guide value:YES];
|
|
|
|
|
@@ -136,12 +137,13 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- }else{
|
|
|
- [bgScrView setContentOffset:CGPointMake((index + 1)*self.view.width, 0) animated:YES];
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self startMoveView];
|
|
|
- });
|
|
|
}
|
|
|
+// else{
|
|
|
+// [bgScrView setContentOffset:CGPointMake((index + 1)*self.view.width, 0) animated:YES];
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+// [self startMoveView];
|
|
|
+// });
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
- (void)drawAnyView{
|
|
@@ -154,34 +156,34 @@
|
|
|
[bgScrView setPagingEnabled:YES];
|
|
|
// [bgScrView setUserInteractionEnabled:NO];
|
|
|
bgScrView.delegate = self;
|
|
|
- [bgScrView setContentSize:CGSizeMake(5*self.view.width,self.view.height)];
|
|
|
+ [bgScrView setContentSize:CGSizeMake(1*self.view.width,self.view.height)];
|
|
|
[bgScrView setClipsToBounds:YES];
|
|
|
[self.view addSubview:bgScrView];
|
|
|
|
|
|
- guideView0 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_0",nil)
|
|
|
- imageName:@"guide_middle_0_icon"
|
|
|
- index:0];
|
|
|
- guideView1 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_1",nil)
|
|
|
- imageName:@"guide_middle_1_icon"
|
|
|
- index:1];
|
|
|
- guideView2 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_2",nil)
|
|
|
- imageName:@"guide_middle_2_icon"
|
|
|
- index:2];
|
|
|
- guideView3 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_3",nil)
|
|
|
- imageName:@"guide_middle_3_icon"
|
|
|
- index:3];
|
|
|
-
|
|
|
- guideView0.frame = CGRectMake(0*self.view.width, 0, self.view.width,self.view.height);
|
|
|
- guideView1.frame = CGRectMake(1*self.view.width, 0, self.view.width,self.view.height);
|
|
|
- guideView2.frame = CGRectMake(2*self.view.width, 0, self.view.width,self.view.height);
|
|
|
- guideView3.frame = CGRectMake(3*self.view.width, 0, self.view.width,self.view.height);
|
|
|
-
|
|
|
- [bgScrView addSubview:guideView0];
|
|
|
- [bgScrView addSubview:guideView1];
|
|
|
- [bgScrView addSubview:guideView2];
|
|
|
- [bgScrView addSubview:guideView3];
|
|
|
+// guideView0 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_0",nil)
|
|
|
+// imageName:@"guide_middle_0_icon"
|
|
|
+// index:0];
|
|
|
+// guideView1 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_1",nil)
|
|
|
+// imageName:@"guide_middle_1_icon"
|
|
|
+// index:1];
|
|
|
+// guideView2 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_2",nil)
|
|
|
+// imageName:@"guide_middle_2_icon"
|
|
|
+// index:2];
|
|
|
+// guideView3 = [[GuideView alloc] initWithTips:NSLocalizedString(@"guide_middle_tips_3",nil)
|
|
|
+// imageName:@"guide_middle_3_icon"
|
|
|
+// index:3];
|
|
|
+//
|
|
|
+// guideView0.frame = CGRectMake(0*self.view.width, 0, self.view.width,self.view.height);
|
|
|
+// guideView1.frame = CGRectMake(1*self.view.width, 0, self.view.width,self.view.height);
|
|
|
+// guideView2.frame = CGRectMake(2*self.view.width, 0, self.view.width,self.view.height);
|
|
|
+// guideView3.frame = CGRectMake(3*self.view.width, 0, self.view.width,self.view.height);
|
|
|
+//
|
|
|
+// [bgScrView addSubview:guideView0];
|
|
|
+// [bgScrView addSubview:guideView1];
|
|
|
+// [bgScrView addSubview:guideView2];
|
|
|
+// [bgScrView addSubview:guideView3];
|
|
|
|
|
|
- guideLastView = [[GuideLastView alloc] initWithFrame:CGRectMake(4*self.view.width, 0, self.view.width,self.view.height)];
|
|
|
+ guideLastView = [[GuideLastView alloc] initWithFrame:CGRectMake(0*self.view.width, 0, self.view.width,self.view.height)];
|
|
|
[bgScrView addSubview:guideLastView];
|
|
|
|
|
|
KWeakSelf
|