Giter VIP home page Giter VIP logo

imageslideshow's Introduction

License Platform Version Carthage compatible

Swift ImageSlideShow for iOS

ImageSlideShow is a simple Slideshow for images (Picture, Photos) for your iOS apps written in Swift 5. You can use this class on iPhone and iPad as well.

alt tag

Features

  • All in one slideshow with generic protocol to provide images directly from the model
  • Pan-gesture-to-dismiss behaviour (like Facebook)

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like ImageSlideShow in your projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.0.1+ is required to build ImageSlideShow (along with Swift 5 and Xcode 10).

Podfile

To integrate ImageSlideShow into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'TargetName' do
  use_frameworks!
  pod 'ImageSlideShowSwift'
end

Then, run the following command:

$ pod install

Installation with Carthage

Currently only iOS is supported.

  1. Add the following to your Cartfile:

    github "dimix/ImageSlideShow"
    
  2. Run carthage update --platform ios

  3. Copy the framework into your project and you are good to go.

How to Use

1. Import ImageSlideShowSwift module

Import ImageSlideShowSwift

ImageSlideShowSwift

2. Instantiate the controller

ImageSlideShowViewController.presentFrom(self){ [weak self] controller in
			
	controller.dismissOnPanGesture = true
	controller.slides = self?.images
	controller.enableZoom = true
	controller.controllerDidDismiss = {
		print("Controller Dismissed")
	}
			
}

You need to provide an array of [ImageSlideShowProtocol] objects. You can use the Demo project to watch details.

Requirements

Current version is compatible with:

  • Swift 5.0
  • XCode 10
  • iOS 9 or later

Are you searching for an old (unsupported) version? Check out:

Credits

Thanks to Lasse-Hansen for the Carthage support!

imageslideshow's People

Contributors

dimix avatar jobinsjohn avatar lasseth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

imageslideshow's Issues

warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.

Hi,
I hope you are doing well.
I used this library in my project. I am appending 604 images. App is working perfectly on simulator but on real device it's not working.

warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.

App crashing in for loop of PhotoSliderView.Swift

for (index, image) in images.enumerated()
{
let imageView = UIImageView(frame: CGRect(x: scrollViewWidth * CGFloat(index),
y: 0,
width: scrollViewWidth,
height: scrollViewHeight))
imageView.image = image
imageView.contentMode = scaleAspectFill
imageView.clipsToBounds = true
scrollView.addSubview(imageView)
}

Help me if you have solution.

set Title for every Slide

Hi,

thanks for your nice ImageSlide!
i want to set a Title for every Slide.
How can I do that?

controller.Title = myArray[controller.currentIndex]

sorry cam new in swift!

Hiding of Navigation bar not working properly

Hi Team,

Thanks a lot for the framework. It made my day.

In the below cases, navigation bar is not hidden properly

  1. According to the code, for the first swipe, only the navigation bar should be hidden. But it is hidden for the second swipe
  2. On image click, if the navigation bar is hidden we are showing the navigation bar. vice-versa is not happening

Can you please look into the above points and do needful.
Thanks,
Ramgopal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.