In an iOS app, I have a 250x85pt UIView. I would like for him to have a background with image-based tiles. The original image is 398x398 px. I would like my image to be tiled.

When I launch the application, my graphics tiles, but for some reason, it scales as follows:

For this, I used the following code:
var image = UIImage(contentsOfFile: "myfilepath.png")! var uicolor = UIColor(patternImage: image) uiview.backgroundColor = uicolor
Could you explain 1. why ios scales my image and 2. How to make a tiled image without scaling?
ios swift uiimage
Alex smolov
source share