drawRect / Instagram_Stories

Inspired by Instagram Stories functionality. This source is similar to Instagram Stories, which is having both image and video support.
MIT License
414 stars 76 forks source link

How to save story id when every story start #143

Closed goodboygb1 closed 1 year ago

goodboygb1 commented 1 year ago

I want to save story id to local storage to check seen and unseen story, so my question is which function do i have to put my code on. I already look on StoryPreviewProtocol but can't found function that trigger when every story start

Thanks for your help

ranmyfriend commented 1 year ago

Hi @goodboygb1 you can collect your viewed story using snapIndex - didSet method create your function in StoryPreviewProtocol and whenever the SnapMovementDirectionState.Forward direction called, you can throw your viewedSnap to your own viewcontroller. Story can have multiple snaps. snap mime type can be a image/Video/etc. How ever you can track which snap already viewed by which story. both you can capture with help of this!!!

goodboygb1 commented 1 year ago

Thanks a lot for your help :)