swift实现网络图片滚动(滑动) 以下代码片段 func scrollViewDidEndDecelerating(scrollView: UIScrollView) { println("滑动") var currentPage = self.scrollView.contentOffset.x/375 println(currentPage) if currentPage == 0 { var w = 375 * Float(self.getPic.count) self.scrollView.scrollRectToVisible(CGRectMake(CGFloat(w), 0, 375, 460), animated: fals e) } if currentPage == CGFloat(self.getPic.count + 1) { self.scrollView.scrollRectToVisible(CGRectMake(375, 0, 375, 460), animated: false) } } e) } if currentPage == CGFloat(self.getPic.count + 1) { self.scrollView.scrollRectToVisible(CGRectMake(375, 0, 375, 460), animated: false) } }