-
Supports portrait orientation(only) in iPhone and all orientations in iPad.
-
Image Support
-
Video Support
-
Long press pause and play
-
Manual swipe between stories
-
Left tap and Right tap gestures to switch between snaps and stories
-
If there is no user interruption, it will automatically move to next snap or next story, once progress bar completes.
-
Image caching handled using NSCache
-
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)
-
Delete snap
-
Clear Image & Video Caches
- 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.
- iOS 10
- Xcode 8
- Hi! We are two people joined together and spent weekends and free time to make this repo as a example of how Instagram stories built in our assumption.
- Ranjith(https://github.com/ranmyfriend), Boominadha Prakash(https://github.com/boominadhaprakash)
- If you like this repository please do ⭐ to make this useful for others.
- Feel free to contribute by open a Issue or create a Pull Request
All the code here is under MIT license. Which means you could do virtually anything with the code. I will appreciate it very much if you keep an attribution where appropriate.
The MIT License (MIT)
Copyright (c) 2013 ranjit (ranjithkumar2010a@live.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.