Tiled Background Image: Can I do that easily with UIImageView?

前端 未结 7 1101
甜味超标
甜味超标 2020-12-07 13:05

I have a fullscreen background image that is tiled, i.e. it has to be reproduced a few times horizontally and vertically in order to make a big one. Like in the browsers on

7条回答
  •  孤城傲影
    2020-12-07 13:48

    To get alpha to work with pattern image, make sure you have the following set:

    view.backgroundColor = [UIColor colorWithPatternImage:aImage];
    view.layer.opaque = NO;
    

提交回复
热议问题