如何将阴影背景白色更改为其他颜色 [英] How to change shadow background white to other colors
本文介绍了如何将阴影背景白色更改为其他颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在执行翻转动画时更改 UIPageViewController
阴影颜色。
但是它总是只显示白色。
如何将翻转背景颜色白色的颜色更改为其他颜色(黑色或塞普亚)。 iBook也在做同样的事情。
I'm trying to change UIPageViewController
shadow color while doing a flip animation.
But always it displaying white color only.
How to change a color of flip side background color white to other colour like (black or sephia). iBook is doing same thing.
我提到下面的图像有白色bg,我会改变颜色。
I mention that below image have white bg that color i would to change.
屏幕截图:
Screenshot:
推荐答案
- (void) renderPageAtIndex:(NSUInteger)index inContext:(CGContextRef)ctx {
UIImage *image = [images objectAtIndex:index];
CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height);
CGAffineTransform transform = aspectFit(imageRect,
CGContextGetClipBoundingBox(ctx));
CGContextConcatCTM(ctx, transform);
CGContextDrawImage(ctx, imageRect, [image CGImage]);
}
这篇关于如何将阴影背景白色更改为其他颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文