meismyles / SwiftWebVC

A drop-in inline browser for your Swift iOS app.
MIT License
330 stars 117 forks source link

Crash while using inside UIPagerViewController #20

Closed kei-sidorov closed 7 years ago

kei-sidorov commented 7 years ago

When using your module inside UIPagerViewController app will crash. It happening because deinit method accessing lazy var that not initialized yet. So lazy var perform init and try to set deallocating object as delegate to WKWebView. UIPagerViewController requires two VC (in case when pager view displays only one VC at time), one of them will be unused and deallocated before loadView() was called.

meismyles commented 7 years ago

Thanks @kei-sidorov. Will investigate this as soon as I get a chance 👍

meismyles commented 7 years ago

Apologies for the very delayed reply here. Been extremely busy so only just getting round to it.

I'm not able to recreate this issue, seems to be working ok for me within a UIPageViewController. Any more information would be great so I can try and reproduce this.

Closing for now but feel free to re-open with more info 👍