IOS 平鋪圖片

weixin_33785972發表於2017-06-28
UIImage *bgImg = [UIImage imageNamed:@"圖集背景@2x_33"];
    UIColor *color = [[UIColor alloc] initWithPatternImage:bgImg];
    UIView *bg = [[UIView alloc] initWithFrame:self.view.frame];
    [bg setBackgroundColor:color];
    [self.view addSubview:bg];

相關文章