wift - view의 그림자
simple.swift
testView.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
testView.layer.shadowColor = UIColor.black.cgColor
testView.layer.shadowOpacity = 0.6
testView.layer.shadowRadius = 4
그림자 방향 shadowOffset
height는 세로 방향, 양수는 아래, 음수는 위입니다.


simple.swift//影は下にある
testView.layer.shadowOffset = CGSize(width: 0.0, height: 30.0)
//影は上にある
testView.layer.shadowOffset = CGSize(width: 0.0, height: -30.0)
width는 가로, 양수는 오른쪽, 음수는 왼쪽입니다.


simple.swift//影は右にある
testView.layer.shadowOffset = CGSize(width: 30.0, height: 0.0)
//影は左にある
testView.layer.shadowOffset = CGSize(width: -30.0, height: 0.0)
그림자 색상 shadowColor

simple.swifttestView.layer.shadowColor = UIColor.blue.cgColor
그림자 투명도 shadowOpacity
범위는 0~1입니다. 0이 투명하고 1이 불투명합니다.

simple.swifttestView.layer.shadowOpacity = 0.2
그림자 너비 shadowRadius

simple.swifttestView.layer.shadowRadius = 30.0
끝에
알기 쉽도록 조금 과장된 수치를 넣었으므로, 자신의 요구로 조정해 주세요.
Reference
이 문제에 관하여(wift - view의 그림자), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Wesley-chu/items/24f5a3a8b9b679822206
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
//影は下にある
testView.layer.shadowOffset = CGSize(width: 0.0, height: 30.0)
//影は上にある
testView.layer.shadowOffset = CGSize(width: 0.0, height: -30.0)
//影は右にある
testView.layer.shadowOffset = CGSize(width: 30.0, height: 0.0)
//影は左にある
testView.layer.shadowOffset = CGSize(width: -30.0, height: 0.0)

simple.swift
testView.layer.shadowColor = UIColor.blue.cgColor
그림자 투명도 shadowOpacity
범위는 0~1입니다. 0이 투명하고 1이 불투명합니다.

simple.swifttestView.layer.shadowOpacity = 0.2
그림자 너비 shadowRadius

simple.swifttestView.layer.shadowRadius = 30.0
끝에
알기 쉽도록 조금 과장된 수치를 넣었으므로, 자신의 요구로 조정해 주세요.
Reference
이 문제에 관하여(wift - view의 그림자), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Wesley-chu/items/24f5a3a8b9b679822206
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
testView.layer.shadowOpacity = 0.2

simple.swift
testView.layer.shadowRadius = 30.0
끝에
알기 쉽도록 조금 과장된 수치를 넣었으므로, 자신의 요구로 조정해 주세요.
Reference
이 문제에 관하여(wift - view의 그림자), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Wesley-chu/items/24f5a3a8b9b679822206
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(wift - view의 그림자), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/Wesley-chu/items/24f5a3a8b9b679822206텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)