有没有办法在CPView上的Objective-J中平铺图像?
类似于以下内容:

  • [CPImage alloc] initWithPatternImage:@“Resources/grid.png”大小:CGSizeMake(5.0,5.0)]

  • 多谢你们 ;)

    最佳答案

    尝试这个:

    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]];
    

    关于cappuccino - CPView平铺背景?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2439430/

    10-12 04:01