#pragma mark - #pragma mark - 添加新手引导//添加帮助图片- (void)addHelpImage{ //显示用户帮助图片 UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, -20, ScreenWidth, ScreenHeight)]; scrollView.delegate = self; scrollView.contentSize = CGSizeMake(ScreenWidth*4, ScreenHeight);// scrollView.delegate = self; scrollView.showsVerticalScrollIndicator = NO; //是否显示垂直滚动条 scrollView.showsHorizontalScrollIndicator = NO; //是否显示水平滚动条 scrollView.backgroundColor = [UIColor clearColor]; scrollView.bounces = YES; //滚动到末端是否要弹性效果 scrollView.pagingEnabled = YES; //scrollView是否响应事件 [self.view addSubview:scrollView]; for (int i = 9; i < 13; i++) { NSString *name = [NSString stringWithFormat:@"%d.png",i+1]; UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:name]]; image.frame = CGRectMake(ScreenWidth*(i-9), 0, ScreenWidth, ScreenHeight); [scrollView addSubview:image]; [image release]; } }#pragma mark - UIScrollViewDelegate- (void)scrollViewDidScroll:(UIScrollView *)sender{ //当响应用户的滑动操作时,修改page控件的值 CGFloat pageWidth = sender.frame.size.width; if (sender.contentOffset.x+pageWidth > sender.contentSize.width+100.0f) { [self enterOtherController]; }}- (void)enterOtherController{ //保存参数,进入住页面 self.settings.guideShown = 0; [_userDefaults setInteger:0 forKey:kShowGuide]; [self settingHomeViewController];}