Closed bchrobot closed 7 years ago
Is this definitely not due to the audio playback becoming system wide? For example, if you play something in the default browser and then background it, it will continue to play and will show the media playback source in the control centre if you slide that up (along with controls to pause it etc.)
Right, but backgrounding is different than what should be a deinit when the modal is dismissed. I added logs in viewDidLoad()
and deinit
for both SwiftWebVC
and SwiftModalWebVC
to confirm.
When SwiftWebVC
is pushed and then popped from the navigation stack it behaves as expected.
When SwiftModalWebVC
is presented and then dismissed both the modal and its SwiftWebVC
are initialized, but only the SwiftModalWebVC
is deinitialized so there is a retain cycle somewhere in there.
Looking at it now but at first glance can't seem to find a pesky reference anywhere that would cause it to be retained. Going to have dig deeper ðŸ˜
I will also do some digging over the holidays when I have a bit more time
Fixed in release 0.2.1 which I am about to push now.
🎉
For example, if you are playing audio in a modal web VC and dismiss it the audio continues playing.
I believe this is due to the
doneButtonTapped
method being handled by the childwebViewController: SwiftWebVC