Tiled CPView background?

Is there a way to focus the image in lens-j on CPView? sort of:

  • [CPImage alloc] initWithPatternImage: @ "Resources / grid.png" size: CGSizeMake (5.0, 5.0)]

Thanks guys;)

+3
source share
1 answer

Try the following:

var image = [[CPImage alloc]
                initWithContentsOfFile:"Resources/myimage.gif"
                                  size:CGSizeMake(20, 20)]; 
var imageView = [[CPImageView alloc] initWithFrame:CGRectMake(0,0,500,500)];    
[imageView setBackgroundColor:[CPColor colorWithPatternImage:image]];
0
source

Source: https://habr.com/ru/post/1736812/


All Articles