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

These brand marketing efforts are useless | Share 4 negative cases

A few days ago, when I was writing advertising sl...

The process of placing Kuaishou information flow ads!

On Kuaishou, users can use photos and short video...

Analysis of the fission gameplay of Pinduoduo activity!

These two days, I couldn't get around the &qu...

How do brands choose UP hosts on Bilibili for promotion?

Bilibili has special platform attributes. From a ...

E-commerce game design and planning techniques (Part 2)

The era of content-based e-commerce has quietly a...

How to design an effective invitation and gift event? Here are 4 tips

The reason why invitation-for-gift events can ach...

How to advertise in the photography industry?

"Family portrait" is an important sub-i...

5 steps to improve product conversion rate!

Double Eleven is coming soon, and many merchants ...

Mobile app performance issues determine user retention

——China’s first in-depth analysis report on mobil...

Case analysis: How are promotional marketing activities planned and implemented?

Next, let’s talk about the design forms of market...

How can Alibaba's Double 11, which makes you confused, hit 150 billion yuan?

In 2009, Tmall (then known as Taobao Mall) began ...