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

Work with server #100

Closed MariaJsn closed 4 years ago

MariaJsn commented 4 years ago

How can I request server to get story before swipe to next story?

When story moves automatically to another one I can request to server than show story. But when user swipe the screen for another story how can I request to the server?

boominadhaprakash commented 4 years ago

Hi @MariaJsn

To implement this, you should know about the methods involved for this functionality. I will explain you about four methods which are responsible for story or snap movement.

  1. Method: -> didCompleteProgress()
  1. Method: -> didCompletePreview()
  1. Method: -> willMoveToPreviousOrNextSnap()
  1. Method: -> moveToPreviousStory()

Additionally, when user swipes the story, two scrollview delegate methods are implemented in IGStoryPreviewController. These methods will trigger when user swipes the story manually. func scrollViewWillBeginDragging(_ scrollView: UIScrollView) func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool)

Let me know, if you are not satisfied with my answer.

boominadhaprakash commented 4 years ago

@MariaJsn Hope we resolved your query and we are closing this issue.