iOS图片实现指定区域拉伸

2022-06-15  本文已影响0人  KobeBrant

//背景图
lazy var bgImg: UIImageView = {
let img = UIImageView()
img.image = UIImage(named: "search_hot_bg")?.resizableImage(withCapInsets: UIEdgeInsets(top: 28, left: 38, bottom: 43, right: 38), resizingMode: .stretch)
return img
}()

上一篇下一篇

猜你喜欢

热点阅读