Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An elegant animated slideshow written in swift

License

NotificationsYou must be signed in to change notification settings

v15a1/Glideshow

Repository files navigation

Frame 3

Glideshow

Generic badgeGeneric badgeGeneric badgeGeneric badge

A slideshow withpizzazz! Glideshow adds transitions to the slideshows labels to set it apart from other conventional "boring" slideshows,

ezgif com-optimize

Installation

CocoaPods

The Glideshow project is available viaCocoaPods. To install it, simply add the following line to your Podfile:

pod 'Glideshow'

Swift Package Manager

Addhttps://github.com/v15a1/Glideshow as a Swift Package in Xcode and follow the instructions.

How to use

Add a Glideshow view to your view hiearchy by Interface Builder or programmatically

Loading images

The contents of the slideshow can be set with the use ofGlideItem as demonstrated below. Further customizations can be configured as mentioned in theConfiguration section

NOTE : Setting theglideFactorto 0 will result in the labels being stationary

// @IBOutlet weak var glideshow : Glideshow!varglideshow=Glideshow()glideshow.items=[GlideItem(title:"Hello there", description:"General Kenobi!", backgroundImage:UIImage(named:"image1")),GlideItem(description:"General Kenobi!", backgroundImage:UIImage(named:"image2")),GlideItem(title:"Hello there", backgroundImage:UIImage(named:"image3")),GlideItem(title:"Hello there", description:"General Kenobi!")    // Network images    GlideItem(caption:"Hello there", description:"General Kenobi!", imageURL:"[ IMAGE URL ]")]

Configuration

The behaviour is configurable by the following properties

PropertyDescription
intervalSlideshow interval is seconds ( Default 0 )
isCircularEnables circular scrolling ( Defaulttrue )
slideMarginMargin of the slides to theUICollectionView
slidePaddingPadding of the content
defaultSlideColorBackground color of the slides ( DefaultUIColor.lightGray )
labelSpacingVertical spacing between labels within a slide ( Default 8 )
isGradientEnabledDisplays gradient in the slide ( Defaultfalse )
gradientColorBase color of the gradient ( DefaultUIColor.black.withAlphaComponent(0.6))
gradientHeightFactorHeight of the gradient based on slide height ( Default 0.5 )
titleFontSets thefont of the slide title
descriptionFontSets thefont of the slide description
captionFontSets thefont of the slide caption
titleColorSets thetextColor of the slide title
descriptionColorSets thetextColor of the slide description
captionColorSets thetextColor of the slide slide caption
titleGlideFactorConfigures the speed of the transition of the title label ( Default 2 )
descriptionGlideFactorConfigures the speed of the transition of the description label ( Default 3 )
captionGlideFactorConfigures the speed of the transition of the caption label ( Default 1 )
pageIndicatorPositionConfigures positon of the pge indicator
placeHolderImageConfigures slide background placeholder if a URL is specified, elsenil

Contributions

A few issue to tackle

  • Pass slide data through delegates
  • Support for Network images
  • Multiple animations
  • Customizable label positionings
  • Code optimizations

Steps to contribution:

  1. Fork the repo
  2. Clone the project
  3. Make your changes
  4. Make a pull request

If you have any question please feel free to open an issue


[8]ページ先頭

©2009-2025 Movatter.jp