i surprised to find nil when i set weak prifix, the code show below:
classA { classB {
var b: classB var col: CGFloat
var col: CGFlaot func run(col: CGFloat){ }
} }
classB`s var or func need to use classA`s var col, so use function code in classA like below:
dispatchQueue_main_async {[ weak self ] in or dispatchQueue_main_async{
if let strongself = self{ self.b = self.getB( ) }
self?.b.col = strongself.col } } func getB( ) -> classB{
let b = classB( )
b.col = { [weak self ] in self?.col } }
i cannot convey classA`s var col to property and function of classB.
thanks for your appriciation.