self.bgView.image = UIImage.init(named: model["bgView"] ?? "")?.resizableImage(withCapInsets: UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 40), resizingMode: UIImageResizingMode.stretch)
转自:https://blog.csdn.net/wc455287693/article/details/47294547
原文:https://www.cnblogs.com/qingzZ/p/9476360.html