You can create a UIColor object using an image pattern by using the UIColor(patternImage:_) method.

btn.backgroundColor = UIColor(patternImage: UIImage(named: "image")!)

http://i.stack.imgur.com/jDgbH.png