在SwiftARC 中,deinit当 anyUIViewController从 memory 中删除时调用,但如果 any 从 memory 中删除,则不会被调用UIView。
例如
如果UIViewController类deinit工作得很好
class MusicPlayerUIViewController: UIViewController,UITableViewDelegate,UITableViewDataSource
{
deinit
{
APP_DELEGATE.RemovePlayerContents()
}
}
但万一UIView上课deinit不工作
class MusicPlayerView: UIView,UITableViewDelegate,UITableViewDataSource
{
deinit
{
APP_DELEGATE.RemovePlayerContents()
}
}
任何的想法 。