嗨,我试着做一个像spotify这样的登录视图。https://github.com/chenjunpu/SpotifyLoginVideo我使用了这个例子。
我的问题是,当我尝试登录页面时,它使用的ram与视频视图相同(加上30 My )。
我试过这个按钮功能,但没什么改变。
self.dismissViewControllerAnimated(true, completion: nil)有什么想法吗?我怎么才能阻止视野,把我的公羊吸干?谢谢
发布于 2016-05-23 22:04:50
我下载https://github.com/chenjunpu/SpotifyLoginVideo上存在的代码,我看到当我们登录时,应用程序继续运行超过100 ram ram。
将此代码添加到WelcomeViewController中
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
self.videoView.removeFromSuperview()
self.videoView = UIView()
}问题解决了,但是我们需要在viewWillAppear上重新设置,所以
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.viewDidLoad()
}这对我来说很好
https://stackoverflow.com/questions/37398714
复制相似问题