Kani Lana
Kani Lana

Reputation: 109

How can I create a view border that looks pencil sketched in Swift?

For example, something like this:

border with pencil sketch style

Upvotes: 2

Views: 105

Answers (1)

Abdelahad Darwish
Abdelahad Darwish

Reputation: 6067

You can use Such way with UIColor.init(patternImage:UIImage)

self.imageView.layer.cornerRadius = 30
self.imageView.layer.borderWidth = 20
self.imageView.layer.borderColor = UIColor.init(patternImage: UIImage(named: "images.jpeg")!).cgColor
self.imageView.clipsToBounds = true

enter image description here

here is pattern image Pattern

Upvotes: 2

Related Questions