|
@@ -14,7 +14,7 @@
|
|
|
#import "connectDeviceManager.h"
|
|
|
#import "inputPWDViewController.h"
|
|
|
|
|
|
-@interface GuideViewController ()
|
|
|
+@interface GuideViewController ()<UIScrollViewDelegate>
|
|
|
{
|
|
|
UIScrollView *bgScrView;
|
|
|
GuideView *guideView0;
|
|
@@ -52,6 +52,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)startMoveView{
|
|
|
+
|
|
|
CGFloat x = bgScrView.contentOffset.x;
|
|
|
NSInteger index = (x+1)/self.view.width;
|
|
|
if (index == 4){
|
|
@@ -111,7 +112,8 @@
|
|
|
[bgScrView setShowsVerticalScrollIndicator:NO];
|
|
|
[bgScrView setShowsHorizontalScrollIndicator:NO];
|
|
|
[bgScrView setPagingEnabled:YES];
|
|
|
- [bgScrView setUserInteractionEnabled:NO];
|
|
|
+// [bgScrView setUserInteractionEnabled:NO];
|
|
|
+ bgScrView.delegate = self;
|
|
|
[bgScrView setContentSize:CGSizeMake(5*self.view.width,self.view.height)];
|
|
|
[bgScrView setClipsToBounds:YES];
|
|
|
[self.view addSubview:bgScrView];
|
|
@@ -141,8 +143,38 @@
|
|
|
|
|
|
guideLastView = [[GuideLastView alloc] initWithFrame:CGRectMake(4*self.view.width, 0, self.view.width,self.view.height)];
|
|
|
[bgScrView addSubview:guideLastView];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ guideView0.didClickButton = ^{
|
|
|
+ [weakSelf didClickSkipFun];
|
|
|
+ };
|
|
|
+
|
|
|
+ guideView1.didClickButton = ^{
|
|
|
+ [weakSelf didClickSkipFun];
|
|
|
+ };
|
|
|
+
|
|
|
+ guideView2.didClickButton = ^{
|
|
|
+ [weakSelf didClickSkipFun];
|
|
|
+ };
|
|
|
+
|
|
|
+ guideView3.didClickButton = ^{
|
|
|
+ [weakSelf didClickSkipFun];
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
+#pragma mark 点击了跳过
|
|
|
+- (void)didClickSkipFun
|
|
|
+{
|
|
|
+ [bgScrView setContentOffset:CGPointMake(4*self.view.width, 0) animated:NO];
|
|
|
+}
|
|
|
|
|
|
-
|
|
|
+#pragma mark 监听滚动
|
|
|
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
|
|
+{
|
|
|
+ CGFloat x = scrollView.contentOffset.x;
|
|
|
+ NSInteger index = (x+1)/self.view.width;
|
|
|
+ if (index == 4){
|
|
|
+ bgScrView.userInteractionEnabled = NO;
|
|
|
+ }
|
|
|
+}
|
|
|
@end
|