ariok / BWWalkthrough

BWWalkthrough is a simple library that helps you build custom walkthroughs for your iOS App
MIT License
2.76k stars 246 forks source link

Problem dismissing from a webview. #93

Closed jesus-rod closed 7 years ago

jesus-rod commented 7 years ago

I've been playing with this library all day and noticed there's an issue when you present a webview. In my case, I am using the Instagram Login within my app. But If I open said webview and before logging in, I try to dissmiss it. Using:

dismissViewControllerAnimated(true, completion: nil)

something really weird happens, it is like everything breaks. (the app doesn't crash but the walkthrough becomes unusable and the views are moved down or to the side)

The only "solution" I found was to repeat the process of showing the walkthrough ie:

let stb = UIStoryboard(name: "Main", bundle: nil) walkthrough = stb.instantiateViewControllerWithIdentifier("container") as! BWWalkthroughViewController let page_one = stb.instantiateViewControllerWithIdentifier("page_1") as UIViewController let page_two = stb.instantiateViewControllerWithIdentifier("page_2") as UIViewController let page_three = stb.instantiateViewControllerWithIdentifier("page_3")as UIViewController let page_four = stb.instantiateViewControllerWithIdentifier("page_4") as UIViewController

`

    walkthrough.delegate = self
    walkthrough.addViewController(page_one)
    walkthrough.addViewController(page_two)
    walkthrough.addViewController(page_three)
    walkthrough.addViewController(page_four)

    self.presentViewController(walkthrough, animated: false, completion: nil)`

however, this is a problem because I am queuing ViewController and I if I open the webview and repeat the process of closing it and opening it a few times, the memory consumption increases significantly. I did it around 10-15 times and the memory usage went up to 200mb...

ariok commented 7 years ago

hello, do you mind to share your code? I'm not able to reproduce the issue you are reporting.

ariok commented 7 years ago

I cannot reproduce the issue. Feel free to open it again with more information