-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- ContentView 자체를 커스텀해서 content view를 파라미터로 받아서 팝업에 표시하도록 구현 - left, right -> top, bottom으로 수정 - withSeprator 플래그를 만들어서 구분선 유뮤 구현 - bottom button(마지막 버튼)은 무조건 separator 있음
- Loading branch information
Showing
3 changed files
with
187 additions
and
68 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
Projects/Modules/DesignSystem/Src/UIComponent/TFAlertContentView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// | ||
// TFAlertContentView.swift | ||
// DSKit | ||
// | ||
// Created by SeungMin on 4/29/24. | ||
// | ||
|
||
import UIKit | ||
|
||
public final class TFAlertContentView: TFBaseView { | ||
private lazy var stackView: UIStackView = { | ||
let stackView = UIStackView() | ||
stackView.axis = .vertical | ||
stackView.spacing = 24 | ||
return stackView | ||
}() | ||
|
||
lazy var titleLabel: UILabel = { | ||
let label = UILabel() | ||
label.text = "어떤 문제가 있나요?" | ||
label.font = UIFont.thtH5Sb | ||
label.textAlignment = .center | ||
label.textColor = DSKitAsset.Color.neutral50.color | ||
label.numberOfLines = 0 | ||
return label | ||
}() | ||
|
||
let buttonStackView: UIStackView = { | ||
let stackView = UIStackView() | ||
stackView.axis = .vertical | ||
stackView.spacing = 20 | ||
return stackView | ||
}() | ||
|
||
public let unpleasantPhotoButton: UIButton = { | ||
let button = UIButton() | ||
button.titleLabel?.font = UIFont.thtSubTitle2R | ||
button.setTitle("불괘한 사진", for: .normal) | ||
button.setTitleColor(DSKitAsset.Color.neutral50.color, for: .normal) | ||
button.setBackgroundColor(DSKitAsset.Color.neutral600.color, for: .normal) | ||
return button | ||
}() | ||
|
||
public let fakeProfileButton: UIButton = { | ||
let button = UIButton() | ||
button.titleLabel?.font = UIFont.thtSubTitle2R | ||
button.setTitle("허위 프로필", for: .normal) | ||
button.setTitleColor(DSKitAsset.Color.neutral50.color, for: .normal) | ||
button.setBackgroundColor(DSKitAsset.Color.neutral600.color, for: .normal) | ||
return button | ||
}() | ||
|
||
public let photoTheftButton: UIButton = { | ||
let button = UIButton() | ||
button.titleLabel?.font = UIFont.thtSubTitle2R | ||
button.setTitle("사진 도용", for: .normal) | ||
button.setTitleColor(DSKitAsset.Color.neutral50.color, for: .normal) | ||
button.setBackgroundColor(DSKitAsset.Color.neutral600.color, for: .normal) | ||
return button | ||
}() | ||
|
||
public let profanityButton: UIButton = { | ||
let button = UIButton() | ||
button.titleLabel?.font = UIFont.thtSubTitle2R | ||
button.setTitle("욕설 및 비방", for: .normal) | ||
button.setTitleColor(DSKitAsset.Color.neutral50.color, for: .normal) | ||
button.setBackgroundColor(DSKitAsset.Color.neutral600.color, for: .normal) | ||
return button | ||
}() | ||
|
||
public let sharingIllegalFootageButton: UIButton = { | ||
let button = UIButton() | ||
button.titleLabel?.font = UIFont.thtSubTitle2R | ||
button.setTitle("불법 촬영물 공유", for: .normal) | ||
button.setTitleColor(DSKitAsset.Color.neutral50.color, for: .normal) | ||
button.setBackgroundColor(DSKitAsset.Color.neutral600.color, for: .normal) | ||
return button | ||
}() | ||
|
||
public override func makeUI() { | ||
addSubview(stackView) | ||
stackView.addArrangedSubviews([titleLabel, buttonStackView]) | ||
|
||
stackView.snp.makeConstraints { | ||
$0.edges.equalToSuperview() | ||
} | ||
|
||
buttonStackView.snp.makeConstraints { | ||
$0.leading.trailing.equalToSuperview() | ||
} | ||
|
||
buttonStackView.addArrangedSubviews([ | ||
unpleasantPhotoButton, | ||
fakeProfileButton, | ||
photoTheftButton, | ||
profanityButton, | ||
sharingIllegalFootageButton | ||
]) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters