Skip to content

Commit 8e6a2d5

Browse files
committed
[FIX] #37 UI FIX
1 parent 5d1c44c commit 8e6a2d5

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

Pinit/Pinit/Views/Cells/PinRecordCell.swift

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ final class PinRecordCell: UICollectionViewCell {
2121
}()
2222
public lazy var thumbnailImageView: UIImageView = {
2323
let imageView = UIImageView()
24-
imageView.contentMode = .scaleToFill
24+
imageView.contentMode = .scaleAspectFill
2525
imageView.backgroundColor = .lightGray
26+
imageView.clipsToBounds = true
2627
return imageView
2728
}()
2829
private lazy var pinTitleLabel: UILabel = {
@@ -98,19 +99,19 @@ final class PinRecordCell: UICollectionViewCell {
9899
extension PinRecordCell {
99100
func captureMapSnapshotWithPin(center: CLLocationCoordinate2D, imageSize: CGSize, completion: @escaping (UIImage?) -> Void) {
100101
let options = MKMapSnapshotter.Options()
101-
options.region = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta: 0.003, longitudeDelta: 0.003))
102-
options.size = imageSize
103-
options.mapType = .standard
104-
105-
let snapshotter = MKMapSnapshotter(options: options)
106-
snapshotter.start { snapshot, error in
107-
guard let snapshot = snapshot, error == nil else {
108-
print("스냅샷 생성 실패")
109-
completion(nil)
110-
return
111-
}
112-
113-
completion(snapshot.image)
102+
options.region = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta: 0.003, longitudeDelta: 0.003))
103+
options.size = imageSize
104+
options.mapType = .standard
105+
106+
let snapshotter = MKMapSnapshotter(options: options)
107+
snapshotter.start { snapshot, error in
108+
guard let snapshot = snapshot, error == nil else {
109+
print("스냅샷 생성 실패")
110+
completion(nil)
111+
return
114112
}
113+
114+
completion(snapshot.image)
115+
}
115116
}
116117
}

Pinit/Pinit/Views/PinDetail/PinDetailViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ final class PinDetailViewController: UIViewController {
102102
let largeImage = UIImage(systemName: "xmark.circle.fill")?.withConfiguration(largeConfig)
103103
let button = UIButton()
104104
button.setImage(largeImage, for: .normal)
105-
button.tintColor = DesignSystemColor.Lavender.value
105+
button.tintColor = .black
106106
button.alpha = 0.7 // 투명도 50% 설정
107107
button.addTarget(self, action: #selector(dismissButtonTapped), for: .touchUpInside)
108108

@@ -145,7 +145,7 @@ final class PinDetailViewController: UIViewController {
145145

146146
// 지도 constraint
147147
mapView.snp.makeConstraints {
148-
$0.top.equalTo(view.safeAreaLayoutGuide.snp.top) // 기기의 안전구역부터 시작하도록
148+
$0.top.equalTo(view.safeAreaLayoutGuide.snp.top).inset(4)
149149
$0.leading.trailing.equalToSuperview().inset(3)
150150
$0.height.equalToSuperview().multipliedBy(0.25) // 기기의 높이 *0.25로 높이 설정
151151
}

Pinit/Pinit/Views/PinEdit/PinEditViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ final class PinEditViewController: UIViewController{
115115
let largeImage = closeImage.withConfiguration(largeConfig)
116116
button.setImage(largeImage, for: .normal)
117117
}
118-
button.tintColor = DesignSystemColor.Lavender.value
118+
button.tintColor = .black
119119
button.alpha = 0.7 // 투명도 50% 설정
120120
return button
121121
}()

0 commit comments

Comments
 (0)