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
Hi, The skip and continue buttons are not working. Can you help me with this please?
The text was updated successfully, but these errors were encountered:
You have to add actions to them. You can tweak them by implementing swiftyOnboardViewForOverlay. Here is an example
@objc private func onContinue() { guard let swiftyOnboard = swiftyOnboard else { return } swiftyOnboard.goToPage(index: swiftyOnboard.currentPage + 1, animated: true) } @objc private func onSkip() { // TODO: Add implementation } func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? { let overlay = SwiftyOnboardOverlay() overlay.continueButton.setTitle("continue", for: .normal) overlay.continueButton.addTarget(self,action: #selector(onContinue), for: .touchUpInside) overlay.skipButton.setTitle("skip", for: .normal) overlay.skipButton.addTarget(self, action: #selector(onContinue), for: .touchUpInside) return overlay }
You can also change the functions later with swiftyOnboardOverlayForPosition
func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) { overlay.continueButton.removeTarget(self, action: #selector(onDone), for: .touchUpInside) overlay.continueButton.removeTarget(self, action: #selector(onContinue), for: .touchUpInside) if position == 2 { overlay.continueButton.setTitle("done", for: .normal) overlay.continueButton.addTarget(self, action: #selector(onDone), for: .touchUpInside) return } overlay.continueButton.setTitle("continue", for: .normal) overlay.continueButton.addTarget(self, action: #selector(onContinue), for: .touchUpInside) }
Hi,
The skip and continue buttons are not working. Can you help me with this please?
The text was updated successfully, but these errors were encountered: