5

I'm using pageViewController inside my app which works fine when its parent view is pushed on navigation stack, but when its parent is being displayed inside a window, then it crashes while navigating to the next viewController with the exception.

Invalid parameter not satisfying: [views count] == 3

Configuration is:

transitionStyle = .scroll
setViewControllers(...animated:true...)

There are already many questions about this on StackOverflow.

Crash1 provides two solutions but one doesn't apply in my case. (textField) & other doesn't work (DispathMainQueue).

Crash2, I've tried setting the view controller inside DisptachMainQueue but it doesn't work, setting setViewControllers(...animated:false...) and transitionStyle: .pageCurl works but is there any other way with animated:true and transitionStyle: .scroll using Swift 4?

regina_fallangi
  • 2,080
  • 2
  • 18
  • 38
Zubair
  • 915
  • 2
  • 9
  • 28

0 Answers0