@@ -131,13 +131,38 @@ final class SetRateViewController: BaseViewController {
131
131
$0. addGestureRecognizer ( tapGesture)
132
132
}
133
133
134
+ private lazy var imageContainer = UIView ( ) . then {
135
+ $0. addSubview ( selectImageButton)
136
+ $0. addSubview ( imageCountLabel)
137
+ }
138
+
134
139
private lazy var selectImageButton = UIButton ( ) . then {
135
- $0. setImage ( UIImage ( named: " AddImageButton " ) , for: . normal)
140
+ var config = UIButton . Configuration. plain ( )
141
+ config. image = EATSSUDesignAsset . Images. addImageButton. image
142
+ config. contentInsets = NSDirectionalEdgeInsets ( top: - 5 , leading: 0 , bottom: 5 , trailing: 0 )
143
+
144
+ $0. configuration = config
136
145
$0. addTarget ( self , action: #selector( didSelectedImage) , for: . touchUpInside)
146
+
147
+ $0. layer. borderWidth = 1
148
+ $0. layer. borderColor = EATSSUDesignAsset . Color. GrayScale. gray500. color. cgColor
149
+ $0. layer. cornerRadius = 8
150
+ $0. clipsToBounds = true
151
+
152
+ $0. contentVerticalAlignment = . center
153
+ $0. contentHorizontalAlignment = . center
154
+ }
155
+
156
+
157
+ private let imageCountLabel = UILabel ( ) . then {
158
+ $0. text = " 사진 0/1 "
159
+ $0. font = . caption3
160
+ $0. textColor = EATSSUDesignAsset . Color. GrayScale. gray500. color
161
+ $0. textAlignment = . center
137
162
}
138
163
139
164
private let deleteMethodLabel = UILabel ( ) . then {
140
- $0. text = " 이미지 클릭 시, 삭제됩니다"
165
+ $0. text = " 사진 클릭 시, 삭제됩니다"
141
166
$0. font = . caption3
142
167
$0. textColor = EATSSUDesignAsset . Color. GrayScale. gray500. color
143
168
}
@@ -183,6 +208,7 @@ final class SetRateViewController: BaseViewController {
183
208
userReviewTextView,
184
209
maximumWordLabel,
185
210
selectImageButton,
211
+ imageCountLabel,
186
212
userReviewImageView,
187
213
deleteMethodLabel,
188
214
nextButton)
@@ -266,6 +292,12 @@ final class SetRateViewController: BaseViewController {
266
292
$0. width. equalTo ( 60 )
267
293
$0. height. equalTo ( 60 )
268
294
}
295
+
296
+ imageCountLabel. snp. makeConstraints {
297
+ $0. top. equalTo ( selectImageButton. snp. bottom) . offset ( - 19 )
298
+ $0. centerX. equalTo ( selectImageButton)
299
+ $0. width. equalTo ( selectImageButton)
300
+ }
269
301
270
302
userReviewImageView. snp. makeConstraints {
271
303
$0. top. equalTo ( maximumWordLabel. snp. bottom) . offset ( 15 )
@@ -386,6 +418,7 @@ final class SetRateViewController: BaseViewController {
386
418
func didTappedimageView( ) {
387
419
userReviewImageView. image = nil // 이미지 삭제
388
420
userPickedImage = nil
421
+ imageCountLabel. text = " 사진 0/1 "
389
422
}
390
423
391
424
private func prepareForNextReview( ) {
@@ -511,6 +544,7 @@ extension SetRateViewController: UIImagePickerControllerDelegate {
511
544
if let image = info [ UIImagePickerController . InfoKey. originalImage] as? UIImage {
512
545
userReviewImageView. image = image
513
546
userPickedImage = image
547
+ imageCountLabel. text = " 사진 1/1 "
514
548
}
515
549
picker. dismiss ( animated: true , completion: nil )
516
550
}
0 commit comments