@@ -105,15 +105,11 @@ private extension NDGLSearchBar {
105105 string: placeholder,
106106 attributes: placeHolderAttributes
107107 )
108-
109- var textAttributes = UIFont . NDGL. bodyLR. attributes
110- textAttributes [ . foregroundColor] = DSKitAsset . Colors. black700. color
111- $0. attributedText = NSAttributedString (
112- string: " " ,
113- attributes: textAttributes
114- )
108+
109+ $0. font = UIFont . NDGL. bodyLR. font
110+ $0. textColor = DSKitAsset . Colors. black700. color
115111 $0. tintColor = DSKitAsset . Colors. black400. color
116-
112+
117113 $0. autocapitalizationType = . none
118114 $0. autocorrectionType = . no
119115 $0. spellCheckingType = . no
@@ -123,7 +119,7 @@ private extension NDGLSearchBar {
123119 let normalColor = DSKitAsset . Colors. black600. color
124120 [ ( leadingButton, leading) , ( trailingButton, trailing) ] . forEach { button, image in
125121 var config = UIButton . Configuration. plain ( )
126- config. image = image. withRenderingMode ( . alwaysTemplate)
122+ config. image = image. resize ( targetSize : 28 . adjustedH ) . withRenderingMode ( . alwaysTemplate)
127123 config. baseForegroundColor = normalColor
128124 button. configuration = config
129125 }
@@ -172,18 +168,3 @@ private extension NDGLSearchBar {
172168 }
173169 }
174170}
175-
176- #Preview {
177- let searchBar = NDGLSearchBar (
178- " 검색어를 입력해주세요 " ,
179- UIImage ( systemName: " chevron.left " ) ?? UIImage ( ) ,
180- UIImage ( systemName: " magnifyingglass " ) ?? UIImage ( )
181- )
182-
183- // 프리뷰 화면에서 가로로 꽉 차게 보이도록 설정
184- searchBar. snp. makeConstraints {
185- $0. width. equalTo ( 375 ) // 일반적인 아이폰 너비
186- }
187-
188- return searchBar
189- }
0 commit comments