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

Skip button when press will not go to next view ? Please help #169

Open
toy5429274 opened this issue Jan 24, 2017 · 1 comment
Open

Skip button when press will not go to next view ? Please help #169

toy5429274 opened this issue Jan 24, 2017 · 1 comment

Comments

@toy5429274
Copy link

`import UIKit
import Onboard

class ViewController: UIViewController{

override func viewDidLoad() {
    super.viewDidLoad()
    
}

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(true)
    
    let firstPage = OnboardingContentViewController(title: "Welcome to titile 1" , body: "Page body goes here 1.", image: UIImage(named: "finder"), buttonText: "Text For Button") { () -> Void in
        print("one")
    }
    
    let secondPage = OnboardingContentViewController(title: "Page Title 2", body: "Page body goes here 2.", image: UIImage(named: "icon"), buttonText: "Text For Button") { () -> Void in
        print("two")
    }
    
    let onboardingVC = OnboardingViewController(backgroundImage: UIImage(named:"background"), contents: [firstPage, secondPage])
    
    firstPage.movesToNextViewController = true
    secondPage.movesToNextViewController = true
    onboardingVC?.shouldBlurBackground = true
    onboardingVC?.allowSkipping = true
    onboardingVC?.skipHandler = {
    
        self.performSegue(withIdentifier: "nextVC", sender: nil)
        
    }
    
    self.present(onboardingVC!, animated: true, completion: nil)
    
}// end viewDidAppear

}// end here`

@oniikal3
Copy link

oniikal3 commented Apr 20, 2017

I think you should do like this

onboardingVC?.skipHandler = {
onboardingVC?.moveNextPage()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants