how to set a background image as colorWithPatternImage in swift

后端 未结 7 629
心在旅途
心在旅途 2020-12-23 11:10

My questions is, is it possible to have a UIView display an image, and if so, how so I do it? All I can find is the colorwithpatternImage which no longer works

相关标签:
7条回答
  • 2020-12-23 12:13

    If you are trying for layer property of an imageview, u should use something like this

    userProfilePic.layer.borderColor = UIColor(patternImage:UIImage(named: "yourimg.png")!).CGColor
    
    0 讨论(0)
提交回复
热议问题