在APP內拼成花花的背景:
UIGraphicsBeginImageContext(self.frame.size);
UIImage *imger = [UIImage imageNamed:@"background-pattern.png"];
[imger drawAsPatternInRect:self.bounds];
UIImage *pimg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndPDFContext();
self.backgroundColor = [UIColor colorWithPatternImage:pimg];
沒有留言:
張貼留言
歡迎大家留言提問,我會答的都會盡力回答!
如果太久沒出現回應就是我又忘記回來看留言了TAT