喜权我喜欢的CALayer的阴影添加到图,其中阴影下被放置并认为最简单的办法是权:留下阴影和UIView的
someView.layer.shadowColor = [[UIColor blackColor] CGColor];
someView.layer.shadowOffset = CGSizeMake(0.0f,0.0f);
someView.layer.shadowOpacity = 1.0f;
someView.layer.shadowRadius = 10.0f;
someView.layer.shadowPath = [[UIBezierPath bezierPathWithRect:someView.bounds] CGPath];
,但我会添加一个更大的阴影如当我增加shadowRadius时它看起来不太好。我如何制作一个看起来不错的左右影子。
我已经和我的设计师这个阴影交谈是小。我需要左右不同的x偏移量。 – Zeropointer
令人惊叹的答案,但家伙有人实施了这个圆角(更光滑),因为这种直肠般的阴影看起来很糟糕。任何见解?提前致谢 ! :) –
使用bezierPathWithRoundedRect而不是 – progrmr