UIView释放时机点

- (void)willMoveToSuperview:(UIView *)newSuperview 
{
      if (newSuperview == nil) {
            //说明当前UIView生命周期结束,需要释放资源可以在这边写
      }

      [super willMoveToSuperview:newSuperview];
}

你可能感兴趣的:(UIView释放时机点)