![
![IMG_0076.PNG](http://upload-images.jianshu.io/upload_images/1399153-d51d1a725770e01d.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
](http://upload-images.jianshu.io/upload_images/1399153-d8df5fec7401c540.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

因项目首页是地图,而且我们的app名字是M-help,下载的人进去一脸“懵逼”,并不知道这个app是干嘛的,所以要求做一个“新手指引”,其实这个功能和引导页差不多用UIScrollView的contentSize和contentOffset(偏移量)这两个属性,需要的图让UI出好,我们只管显示就行了!!ok,话不多说,上代码,需要的可以直接拿过去~

代码在appdelegate里面写

// 移除引导页
-(void)removeLun
{
    [scrollView removeFromSuperview];
    newScrollView = [[UIScrollView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    [self.window.rootViewController.view addSubview:newScrollView];
    [self.window.rootViewController.view bringSubviewToFront:newScrollView];
    newScrollView.bounces = NO;
    newScrollView.showsHorizontalScrollIndicator = NO;
    newScrollView.showsVerticalScrollIndicator = NO;
    newScrollView.pagingEnabled = NO;
    NSArray *imageArr = @[@"新手引导-1.jpg",@"新手引导-2.jpg",@"新手引导-3.jpg"];
    // 设置scrollview内容
    for (int i = 0; i 

文章来源于互联网:iOS开发之新手引导页

发表评论