Instagram Stories clone in swift

An open source library is similar to WhatsApp/Facebook/Instagram-like Video Stories which is having both image and video support in swift.

This source is similar to Instagram Stories.Inspired by Instagram Stories functionality. 

Instagram Stories clone in swift
  • language: Swift 5.0
  • platform: ios 
  • device: iphone | ipad
  • license: MIT

Tag

Instagram Stories clone in swift
Instagram Stories clone in swift

How To Use

Open the project(InstagramStories) folder. You can find the Source folder inside.

Drag and drop Source folder into your project.

In your project use same IGStoryPreviewController.

But do not change default code what we have written inside IGStoryPreviewController. You can add code on top of that.

Also do not change collectionView custom cell. Use the same IGStoryPreviewCell.

Because all the functionalities are handled in the IGStoryPreviewCell only.

If there is any issue or stuck somewhere on configuring Source folder on your project, please raise issues on github. We will reply back as soon as possible.

Requirements

  • iOS 10
  • Xcode 8

Features

Supports portrait orientation(only) in iPhone and all orientations in iPad.

  1. Image Support
  2. Video Support
  3. Long press pause and play
  4. Manual swipe between stories
  5. Left tap and Right tap gestures to switch between snaps and stories
  6. If there is no user interruption, it will automatically move to next snap or next story, once progress bar completes.
  7. Image caching handled using NSCache
  8. Video caching handled in documents directory using FileManager.

User can define the snap index, from where they want to start the snap by setting the handPickedSnapIndex value. In IGHomeController, when instantiating IGStoryPreviewController user can set this value. The below code is just reference and it has written in IGHomeController.

let storyPreviewScene = IGStoryPreviewController.init(stories: stories_copy, handPickedStoryIndex: indexPath.row-1, handPickedSnapIndex: 2)

Download

Instagram Stories

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *