- (void)imageBg
{
UIImage *oldImage = [UIImage imageNamed:@"me"];
UIGraphicsBeginImageContextWithOptions(self.view.frame.size, NO, 0.0);
[oldImage drawInRect:self.view.bounds];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.view.backgroundColor = [UIColor colorWithPatternImage:newImage];
}
时间: 2024-10-12 09:13:32