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
416 stars 76 forks source link

didCompletePreview method not being called in my controller, as i want to make the seen request to server #142

Open halainn opened 1 year ago

halainn commented 1 year ago

I know that if we need to Move seen stories status back to server in order to get the updated stories from the server we need to call API in didCompleteProgress method in the IGStoryPreviewCell. but when i seen the snap this method is not being called in my controller so how can i do this please explain.

extension ViewController: StoryPreviewProtocol {

   func moveToPreviousStory() {
        print("Goes to previous story")
    }

    func didTapCloseButton() {
        print("Goes Cancel")
    }

    func didCompletePreview()
    {
        print("Goes here")

        self.CallViewStoryService()
    }
}

delegate not being called in my view controller

Thanks

ranmyfriend commented 1 year ago

Hi @halainn Please enable breakpoints on this project and try to get answer for your questions.

halainn commented 1 year ago

Hello @ranmyfriend I did it but it called in IGStoryPreviewCell file, not in my controller.

ranmyfriend commented 1 year ago

Check whether you given delegate or not?

halainn commented 1 year ago

Yes i given delegate

extension ViewController: StoryPreviewProtocol {
}

this is correct or i missed something, please guide me

halainn commented 1 year ago

Hello @ranmyfriend any update?

boominadhaprakash commented 1 year ago

@halainn Did you confirmed cell.delegate = self ?

Note: Cell is IGStoryPreviewCell