IOS 纹理填充 背景

1 UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
2 testView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"纹理图片.png"]];

原来一直都是用的都是一整张图 --!
原文地址:https://www.cnblogs.com/cokecoffe/p/2772507.html