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 the dog thinking about when he tilts his head?

© Rebecca Nelson Leviathan Press: Cat owners know...

Does a brand website need to add the website name in the title of each web page?

Does a brand website need to add the website name...

Is it okay to put two Wenchang Pagodas at home? Will that be too much?

I think everyone knows that the placement of the ...

Wedding photography advertising promotion case!

After the epidemic, the May Day holiday is approa...

How to edit short videos for popular Douyin without any basic knowledge?

When it comes to Tik Tok, everyone is familiar wi...

What is the difference between renting a game server and renting other servers?

What is the difference between renting a game ser...

Creativity | A comprehensive review of Christmas marketing strategies!

In a blink of an eye, 2019 is almost over. At the...

What did the Internet giants do on April Fools' Day?

Editor’s Note: Although this year's April Foo...

What is it like to write code for ten years?

[[148381]] I found that there are many engineers ...