Skip to content

Commit 6dafdf8

Browse files
committed
Merge pull request #15 from furiatti/master
Remove observer notification only in method deinit
2 parents dfa4391 + 46aa1ee commit 6dafdf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

VideoSplash/Source/VideoSplashViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public class VideoSplashViewController: UIViewController {
9292

9393
override public func viewWillDisappear(animated: Bool) {
9494
super.viewDidDisappear(animated)
95-
NSNotificationCenter.defaultCenter().removeObserver(self)
9695
}
9796

9897
private func setMoviePlayer(url: NSURL){
@@ -140,6 +139,8 @@ public class VideoSplashViewController: UIViewController {
140139

141140
deinit{
142141
self.moviePlayer.player?.removeObserver(self, forKeyPath: "status")
142+
NSNotificationCenter.defaultCenter().removeObserver(self)
143+
143144
}
144145

145146
// Override in subclass

0 commit comments

Comments
 (0)