Skip to content

Commit cf5b9af

Browse files
committed
[FIX] #19 배경 투명이었던거 흰색으로 수정, x버튼 누르면 뒤로가기 추가
1 parent 4f7c68b commit cf5b9af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Pinit/Pinit/Views/PinEdit/PinEditViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ final class PinEditViewController: UIViewController, UITextViewDelegate {
2222
override func viewDidLoad() {
2323
super.viewDidLoad()
2424

25+
view.backgroundColor = .white
26+
2527
switch pinmode {
2628
case let .create(latitude, longtitude):
2729
print("\(latitude), \(longtitude)")
@@ -49,6 +51,7 @@ final class PinEditViewController: UIViewController, UITextViewDelegate {
4951
}
5052
closeButton.tintColor = .black
5153
closeButton.alpha = 0.7 // 투명도 50% 설정
54+
closeButton.addTarget(self, action: #selector(dismissButtonTapped), for: .touchUpInside)
5255

5356
//MARK: 왼쪽 기록 날짜 버튼
5457
datebutton.backgroundColor = .clear
@@ -224,6 +227,10 @@ final class PinEditViewController: UIViewController, UITextViewDelegate {
224227
object: nil)
225228
}
226229

230+
@objc func dismissButtonTapped() {
231+
self.dismiss(animated: true)
232+
}
233+
227234
//MARK: 키보드가 나타낼때 화면을 -300
228235
@objc func keyboardWillShow(notification: NSNotification) {
229236
view.frame.origin.y = -300

0 commit comments

Comments
 (0)