[CALayer]
UIImage *aImage = [UIImage imageNamed:@"myPhoto.jpg"]; CALayer *layer1 = [CALayer layer]; layer1.frame = CGRectMake(110, 20, 100, 66); layer1.contents = (id)aImage.CGImage; [self.view.layer addSublayer:layer1]; CALayer *layer2 = [CALayer layer]; layer2.frame = CGRectMake(85, 106, 150, 100); layer2.contents = (id)aImage.CGImage; [self.view.layer addSublayer:layer2]; CALayer *layer3 = [CALayer layer]; layer3.frame = CGRectMake(0, 226, 320, 213); layer3.contents = (id)aImage.CGImage; [self.view.layer addSublayer:layer3]; |
UILabel 的垂直翻轉
label.layer.transform = CATransform3DMakeRotation(M_PI, 1.0f, 0.0f, 0.0f);
沒有留言:
張貼留言