     //scrollViewWillBeginDecelerating:将要开始滚动，重置指示器位置
     override func scrollViewWillBeginDecelerating(scrollView: UIScrollView)
     {
+        if(self.startButton.layer.opacity==1)
+        {
+            self.displayStartButton(false)
+        }
         self.pageControl.indicator.restoreAnimation(1.0/Float(self.pageControl.pageCount))
     }
     

    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
    }
}

        layout.itemSize=PbSystem.screenCurrentSize(true)
        self.collectionView?.setCollectionViewLayout(layout,animated: false)
        
        //pageControl+startButton
        let metrics=["width":self.pageControlSize().width,"height":self.pageControlSize().height,"btnWidth":self.startButtonSize().width,"btnHeight":self.startButtonSize().height,"margin":20]
        let views=["pageControl":self.pageControl,"startButton":self.startButton]
        //纵向
        self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:[startButton(==btnHeight)]-margin-[pageControl(==height)]-margin-|", options:.AlignAllCenterX, metrics: metrics, views:views))
        //横向
        self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[pageControl(==width)]", options:.AlignAllBaseline, metrics: metrics, views:views))
        self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[startButton(==btnWidth)]", options:.AlignAllBaseline, metrics: metrics, views:views))
        //中心位置
        self.view.addConstraint(NSLayoutConstraint(item: self.view, attribute:.CenterX, relatedBy:.Equal, toItem: self.pageControl,attribute:.CenterX, multiplier: 1, constant: 0))
        self.view.addConstraint(NSLayoutConstraint(item: self.view, attribute:.CenterX, relatedBy:.Equal, toItem: self.startButton,attribute:.CenterX, multiplier: 1, constant: 0))
    }
    
    //displayStartButton:显示进入按钮
    private func displayStartButton(show:Bool)
    {
        if(show)
        {
            UIView.animateWithDuration(0.1, animations: { () -> Void in
                self.startButton.layer.opacity=1
                }) { (finished) -> Void in
                    
            }
        }
        else
        {
            UIView.animateWithDuration(0.1, animations: { () -> Void in
                self.startButton.layer.opacity=0
                }) { (finished) -> Void in
                    
            }
        }
    }
    
    //scrollViewDidScroll:滚动时执行粘土动画
