1234567891011121314151617181920212223 |
- //
- // MCBaseViewModel.swift
- // HCQuanfangtong
- //
- // Created by Apple on 2022/2/18.
- // Copyright © 2022 Jyp. All rights reserved.
- //
- import UIKit
- class MCBaseViewModel: NSObject {
- deinit {
- //处理未执行完请求的释放
- Mirror(reflecting: self).children.forEach { (child) in
- if let _ = child.label{
- if child.value is MCDataRequest{
- (child.value as? MCDataRequest)?.cancel()
- }
- }
- }
- }
- }
|