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

What is a learning and growth community?

In 2016, you must have seen many WeChat friends p...

2021, thank you for your hug

Your browser does not support the video tag 2021 ...

Tips for editing and producing popular short videos!

With the rise of short videos, everyone with a mo...

3000 words in-depth explanation of bidding promotion sorting rules!

People in the industry all know something about t...

Unboxing the Xiaomi Router Youth Edition: A Must-Have for College Dormitories

On August 13, 2015, Xiaomi launched the Xiaomi Ro...