Swiftpack.co - Package - engsulta/IGStoriesView

IGStoriesView

Summary

IGStoriesView is a simple stories card reusable component with many features and easy way of integration.

Getting started

To get started, you will need to setup cocoapods and pod install IGStoriesView

pod 'IGStoriesView'

Supported Platform

.iOS(.v12) and later

How to integrate in your UIViewController

1- add reference to IGStoriesView in your xib or storyboard

 @IBOutlet weak var storyCardView: IGStoriesCardView!

2- pass the list of stories view models of type IGStoriesViewModel


public struct IGStoriesViewModel {
    var image: String?
    var name: String?
    var isSeen: Bool?
    var userId: String?
}

Then add to your VC

storyCardView.storiesViewModels = allStories
storyCardView.delegate = self

to listen to the action of openeing one story you should set delegate of type IGStoriesCollectionViewActionsDelegate

Example


extension ViewController: IGStoriesCollectionViewActionsDelegate {
    func collectionView(_ collectionView: UICollectionView, didSelect userId: String?) {
        // present your story here
    }
}

That's all you should see

{: style="width:250px"}

Github

link
Stars: 4

Dependencies

Used By

Total: 0

Releases

v0.0.4 - 2020-10-09 23:56:05

fix issues in SwiftPM integration

v0.0.3 - 2020-10-09 23:13:09

add support for SPM

v 0.0.2 - 2020-10-09 19:55:26

a first production release 0.0.2 support os 12 and later