QuartzCore.framework을 사용할 수 있습니다.
모든 UIView의 통해 UR 프로젝트에 QuartzCore.framework를 추가
- 에 U 도움을 줄 수 이는의 CALayer있다 (빌드 단계 => 링크 바이너리 라이브러리)
- # import를 "QuartzCore/QuartzCore.h"
- (void) stylingUIView:(UIView *) _view
{
[_view.layer setBorderWidth:3]; // add border to the UIView
[_view.layer setBorderColor:[UIColor colorWithRed:0.7f green:0.7f blue:0.7f alpha:0.2].CGColor]; // set border Color for the UIView
[_view.layer setShadowColor:[UIColor blackColor].CGColor]; //set shadow color for the UIView
[_view.layer setShadowRadius:10]; // set Shadow radius
}
: 유 그림자 것 파일에
그럼 당신은 뭔가를 할 수 있습니다귀하의 사례 :
[(UIViewController) viewController.view.layer setShadowRadius:10];
[(UIImageView) *imageView setShadowRadius:10];
다음과 같이 할 수 있습니다 :