我尝试进行api调用并使用异步代码分配结果。这就是我所拥有的。
let bottomBorder = CALayer()
bottomBorder.frame = CGRect(x: 0.0, y: 43.0, width: cell.contentView.frame.size.width, height: 1.0)
bottomBorder.backgroundColor = UIColor(white: 0.8, alpha: 1.0).cgColor
cell.contentView.layer.addSublayer(bottomBorder)
到代码完成时,信息未定义'。我怎样才能使这个方法异步?