     override func scrollViewDidEndDecelerating(scrollView: UIScrollView)
     {
         self.pageControl.indicator.lastContentOffset=scrollView.contentOffset.x
-    }
-    
-    //scrollViewDidEndScrollingAnimation:结束滚动动画，记录最后位置
-    override func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView)
-    {
-        self.pageControl.indicator.lastContentOffset=scrollView.contentOffset.x
+        self.pageControl.selectedPage=Int(Double(scrollView.contentOffset.x)/Double((self.collectionView?.collectionViewLayout as! UICollectionViewFlowLayout).itemSize.width))
+        if(self.pageControl.selectedPage == self.collectionData!.count-1)
+        {
+            self.displayStartButton(true)
+        }
     }
 }

    func pageControlSize() -> CGSize
    {
        return CGSizeMake(80,15)
    }
    
    //setCollectionViewLayout:设置单元格布局

        self.pageControl.swipeEnable = true
        self.pageControl.frame=CGRectMake(0, 0,self.pageControlSize().width,self.pageControlSize().height)
        
        //startButton
        self.startButton.setTranslatesAutoresizingMaskIntoConstraints(false)
        self.startButton.setTitle("开始使用",forState:.Normal)
        self.startButton.setTitleColor(UIColor.darkGrayColor(),forState:.Normal)
        self.startButton.setBackgroundImage(UIImage.imageWithColor(UIColor.smokeWhiteColor(), size: self.startButtonSize()), forState: UIControlState.Normal)
        self.startButton.clipsToBounds=true
        self.startButton.layer.opacity=0
        
        //collectionView
        self.collectionView?.backgroundColor=UIColor.whiteColor()
        self.collectionView?.showsHorizontalScrollIndicator=false
