Blur 효과 넣어주기

추후 작성 예정

점선 그리기

Carmu에서 실제 적용해본 코드

final class FriendListView: UIView {

		...(중략)...

    **// 점선 테두리 배경
    lazy var borderLayer: CAShapeLayer = {
        let borderLayer = CAShapeLayer()
        borderLayer.strokeColor = UIColor.theme.blue3?.cgColor
        borderLayer.lineDashPattern = [4, 4]
        borderLayer.fillColor = nil
        return borderLayer
    }()**
    // 비어있음 라벨
    lazy var emptyFriendLabel: UILabel = {
        let emptyFriendLabel = UILabel()
        emptyFriendLabel.text = "아직 친구가 없습니다.\n새 친구를 추가해보세요!"
        emptyFriendLabel.numberOfLines = 0
        emptyFriendLabel.font = UIFont.carmuFont.headline1
        emptyFriendLabel.textColor = UIColor.semantic.textBody
        emptyFriendLabel.textAlignment = .center
        return emptyFriendLabel
    }()

		...(중략)...

    override func layoutSubviews() {
        super.layoutSubviews()
        **borderLayer.frame = emptyFriendLabel.bounds
        borderLayer.path = UIBezierPath(roundedRect: emptyFriendLabel.bounds, cornerRadius: 16).cgPath**
    }

    override func draw(_ rect: CGRect) {
        setupViews()
        setAutoLayout()
    }

    func setupViews() {
        addSubview(friendListTableView)

        addSubview(emptyView)
        addSubview(emptyFriendLabel)

        **emptyFriendLabel.layer.addSublayer(borderLayer)**
    }

		...(중략)...

}

Untitled

레퍼런스

[iOS - swift] 블러 효과, 색상 필터링 효과 주는 방법 (UIVisualEffectView, UIBlurEffect, UIVibrancyEffect)

How to set the BlurRadius of UIBlurEffectStyle.Light

[iOS] 점선 그리기