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

does not work correctly in viewDidLoad #13

Open
janczakb opened this issue Nov 8, 2018 · 4 comments
Open

does not work correctly in viewDidLoad #13

janczakb opened this issue Nov 8, 2018 · 4 comments

Comments

@janczakb
Copy link

janczakb commented Nov 8, 2018

Using the presentation in the viewDidLoad block does not work

@emresancaktar
Copy link

try to run in viewDidAppear

@NikolaKirev
Copy link
Owner

Is this still an issue? If so, can you show a code snippet of how you attempt to present the onboarding VC?

Thanks!

@yeabsira-gashaw
Copy link

I faced the same issue too. Put the OnBoardKit Snippet into viewDidAppear method to bypass this problem

@vpronaldo
Copy link

I faced the same issue too. Put the OnBoardKit Snippet into viewDidAppear method to bypass this problem

I tried this and still not able to run it. I wanted to automatically call it. Here is what I tried :

override func viewWillAppear(_ animated: Bool) {
        let tintColor = UIColor(red: 1.00, green: 0.52, blue: 0.40, alpha: 1.00)
        let titleColor = UIColor(red: 1.00, green: 0.35, blue: 0.43, alpha: 1.00)
        let boldTitleFont = UIFont.systemFont(ofSize: 32.0, weight: .bold)
        let mediumTextFont = UIFont.systemFont(ofSize: 17.0, weight: .semibold)
        let appearanceConfiguration = OnboardViewController.AppearanceConfiguration(tintColor: tintColor,
                                                                                    titleColor: titleColor,
                                                                                    textColor: .white,
                                                                                    backgroundColor: .black,
                                                                                    titleFont: boldTitleFont,
                                                                                    textFont: mediumTextFont)
        let onboardingVC = OnboardViewController(pageItems: onboardingPagesAlternative,
                                                 appearanceConfiguration: appearanceConfiguration)
        onboardingVC.modalPresentationStyle = .formSheet
        onboardingVC.presentFrom(self, animated: true)
    }

I am getting this in the console :

OnboardExample[13039:438676] [Presentation] Attempt to present <OnboardKit.OnboardViewController: 0x7fd6a100e530> on <OnboardExample.ViewController: 0x7fd69ed05200> (from <OnboardExample.ViewController: 0x7fd69ed05200>) whose view is not in the window hierarchy.

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

5 participants