【发布时间】:2013-03-01 23:27:10
【问题描述】:
我使用以下代码在 UIView 后面绘制阴影
self.view.layer.borderColor = [UIColor whiteColor].CGColor;
self.view.layer.shadowColor = [UIColor blackColor].CGColor;
self.view.layer.shadowOpacity = 1.0;
self.view.layer.shadowRadius = 25.0;
self.view.layer.shadowOffset = CGSizeMake(0, 3);
self.view.clipsToBounds = NO;
CGPathRef shadowPath = [UIBezierPath bezierPathWithRect:self.view.layer.bounds].CGPath;
[self.view.layer setShadowPath:shadowPath];
这在模拟器和 iPhone5 上可以正常工作。但是在我的 iPad3 上:根本没有阴影。
知道怎么来的吗?
【问题讨论】:
标签: ios objective-c quartz-graphics shadow