Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could be possible to change OverlayView delegate? #100

Closed
LiborZ opened this issue Mar 3, 2017 · 6 comments
Closed

Could be possible to change OverlayView delegate? #100

LiborZ opened this issue Mar 3, 2017 · 6 comments

Comments

@LiborZ
Copy link

LiborZ commented Mar 3, 2017

Hi,
would it be possible to make delegate in OverlayView public (and OverlayViewDelegate protocol)? I want to have options to change what happened when user clicked on overlay. For example I don't want to skip just one step but skip all steps and hide instructions. I made it by these modifications but it's just local and when I need update libraries there would be problem. So what it be possible someway? Maybe delegate can stay internal but you can add method to change delegate or something like that. Thanks

@ephread
Copy link
Owner

ephread commented Mar 6, 2017

Hello @LiborZ, if I understand correctly your needs, you can use showNext(numberOfCoachMarksToSkip numberToSkip: Int = 0) on CoachMarkController.flow to skip certain coach marks, or CoachMarksController.stop() to complete the flow.

Touching the overlay will eventually trigger func coachMarksController(_ coachMarksController: CoachMarksController, coachMarkWillLoadAt index: Int) -> Bool for the next coach mark in the queue. There, based on the index, you can choose to skip all remaining coach marks.

@LiborZ
Copy link
Author

LiborZ commented Mar 7, 2017

I want to skip all marks but only if user touch the overlay. Yes overlay will eventually trigger func coachMarksController(_ coachMarksController: CoachMarksController, coachMarkWillLoadAt index: Int) -> Bool but it's trigger even if I touch coach mark before. I need to detect if user touch overlay or touch coach mark.

@ephread
Copy link
Owner

ephread commented Mar 13, 2017

Alright, thanks for the clarification. We can definitely split the two! I'll put that on the roadmap.

@LiborZ
Copy link
Author

LiborZ commented Apr 16, 2017

Are you planning new version with this enhancement any time soon? :) Thanks for info

@LiborZ
Copy link
Author

LiborZ commented Jul 11, 2017

Any progress with this? This should be change only in 3 lines of code :) Just change delegate properties from internal to public :)

@ephread ephread closed this as completed in f91330d Aug 9, 2017
@ephread
Copy link
Owner

ephread commented Aug 9, 2017

1.1.0 introduces a new delegate method which should suit your needs, see here 😉

zabolotiny pushed a commit to zabolotiny/Instructions that referenced this issue Aug 7, 2018
Tonbouy pushed a commit to Tonbouy/Instructions that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants