Swift version of infinite slideshow scrolling

Swift version of infinite slideshow scrolling

Source code introduction: Swift version of slideshow, scrollView*** scrolling, support network and local picture display!

  1. 1. Swift code writing.
  2. 2. iOS 7.0 or above.
  3. 3. scrollView implements 3D scrolling and automatic scrolling display.
  4. 4. Support local picture slideshow data and network picture slideshow.
  5. 5. Easy to use, one-click integration.

Effect screenshots:

Source code snippet:

  1. //Create and display a local slideshow:  
  2. //Create SwiftPPT  
  3. var pptView = CFPPTView(type: PPTType.local) { () -> [PPTDataModel] in
  4.  
  5. var localImages = [UIImage(named: "local1" ),UIImage(named: "local2" ),UIImage(named: "local3" ),UIImage(named: "local4" )]
  6.  
  7. var localTitleStr = [ "Local Slideshow: Stills of The Journey of Flower 1" , "Local Slideshow: Stills of The Journey of Flower 2" , "Local Slideshow: Stills of The Journey of Flower 3" , "Local Slideshow: Stills of The Journey of Flower 4" ]
  8.  
  9. var dataModels: [PPTDataModel] = Array()
  10.  
  11. for i in 0 ..<localImages.count {
  12.  
  13. var dataModel = PPTDataModel(localImage: localImages[i]!, titleStr: localTitleStr[i])
  14.  
  15. dataModels.append(dataModel)
  16. }
  17.  
  18. return dataModels
  19. }
  20. pptView.frame = CGRectMake( 0 , 80 , Screen.width, 160 )
  21.  
  22. self.view.addSubview(pptView)

Download address: http://download..com/data/2068657

<<:  The Forefront of Chinese Design——Web Design Trends in 2015 (Selected)

>>:  Easy learning: the role of IMP pointer in Runtime

Recommend

Coughing non-stop, use cough patch? Beware of chemical burns

Audit expert: Peng Guoqiu Deputy Chief Physician,...

How to position your personality in short videos?

We have seen that many popular short video accoun...

20 pieces of Qianchuan investment experience and practice!

Since last year, Douyin e-commerce's delivery...

What is short video operation? What does short video operation do?

The popularity of Tik Tok has redefined the mobil...

Pinduoduo’s method of improving user conversion rate!

Pinduoduo, an e-commerce company, achieved revenu...