-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
268 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
56 changes: 56 additions & 0 deletions
56
KkuMulKum/Source/Onboarding/Welcome/View/WelcomeVIew.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,56 @@ | ||
// | ||
// WelcomeVIew.swift | ||
// KkuMulKum | ||
// | ||
// Created by 이지훈 on 7/10/24. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
class WelcomeView: BaseView { | ||
let characterImageView = UIImageView().then { | ||
$0.image = UIImage(named: "img_logo") | ||
$0.contentMode = .scaleAspectFit | ||
} | ||
|
||
let welcomeLabel = UILabel().then { | ||
$0.text = "이름이름이님 반가워요!" | ||
$0.textAlignment = .center | ||
$0.font = UIFont.pretendard(.body01) | ||
} | ||
|
||
let confirmButton = UIButton().then { | ||
$0.setTitle("확인", for: .normal) | ||
$0.setTitleColor(.white, for: .normal) | ||
$0.backgroundColor = .maincolor | ||
$0.layer.cornerRadius = 8 | ||
} | ||
|
||
override func setupView() { | ||
addSubview(characterImageView) | ||
addSubview(welcomeLabel) | ||
addSubview(confirmButton) | ||
} | ||
|
||
override func setupAutoLayout() { | ||
characterImageView.snp.makeConstraints { | ||
$0.top.equalTo(safeAreaLayoutGuide).offset(200) | ||
$0.centerX.equalToSuperview() | ||
$0.height.width.equalTo(150) | ||
} | ||
|
||
welcomeLabel.snp.makeConstraints { | ||
$0.top.equalTo(characterImageView.snp.bottom).offset(20) | ||
$0.centerX.equalToSuperview() | ||
} | ||
|
||
confirmButton.snp.makeConstraints { | ||
$0.bottom.equalTo(safeAreaLayoutGuide).offset(-20) | ||
$0.leading.trailing.equalToSuperview().inset(20) | ||
$0.height.equalTo(50) | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
KkuMulKum/Source/Onboarding/Welcome/ViewController/WelcomeViewcontroller.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,41 @@ | ||
// | ||
// WelcomeViewController.swift | ||
// KkuMulKum | ||
// | ||
// Created by 이지훈 on 7/10/24. | ||
// | ||
|
||
import UIKit | ||
|
||
class WelcomeViewController: BaseViewController { | ||
|
||
private let welcomeView = WelcomeView() | ||
|
||
override func loadView() { | ||
view = welcomeView | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setupView() | ||
setupAction() | ||
setupDelegate() | ||
} | ||
|
||
override func setupView() { | ||
// 배경색상 설정 | ||
view.backgroundColor = .green2 | ||
} | ||
|
||
override func setupAction() { | ||
welcomeView.confirmButton.addTarget(self, action: #selector(confirmButtonTapped), for: .touchUpInside) | ||
} | ||
|
||
override func setupDelegate() { | ||
// 필요한 경우 delegate 설정 | ||
} | ||
|
||
@objc private func confirmButtonTapped() { | ||
print("확인 버튼이 탭되었습니다.") | ||
} | ||
} |