1

Hi all i'm trying to make a login view like spotify. https://github.com/chenjunpu/SpotifyLoginVideo i use this example.

My problem is that when i try to go to login page the ram that it use is the same with the video view (plus 30mb)

I tried this on the buttons function but nothing changed

self.dismissViewControllerAnimated(true, completion: nil)

Any ideas how can i stop the view drain my ram? Thanks

mike vorisis
  • 2,786
  • 6
  • 40
  • 74

1 Answers1

1

I Download code existing on https://github.com/chenjunpu/SpotifyLoginVideo I see when we go to login the application keeps running over 100Mbs ram.

adding this code to WelcomeViewController

override func viewDidDisappear(animated: Bool) {
    super.viewDidDisappear(animated)
    self.videoView.removeFromSuperview()
    self.videoView = UIView()
}

problem solved but we need to setup all over again on viewWillAppear so

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)
    self.viewDidLoad()
}

this works for me regards

Reinier Melian
  • 20,519
  • 3
  • 38
  • 55