๐ iOS122 [Swift] UIButton ์์ง์ผ๋ก ๋ฐฐ์นํ๊ธฐ with Configuration ์ด๋ ๊ฒ ๊ทธ๋ฆผ๊ณผ ๊ธ์๊ฐ ์์ง์ผ๋ก ๋ฐฐ์น๋๋ ๊ฒฝ์ฐ๊ฐ ์ข ์ข ์๋๋ฐ ์ด๋ ์๋ ์ฝ๋๋ฅผ ์ฌ์ฉํ๋ฉด ์ฝ๊ฒ ์์ง ๋ฐฐ์นํ ์ ์๋ค ์ถ์ฒ https://velog.io/@ezidayzi/iOS-UIButton-title-image-align-%ED%95%98%EA%B8%B0 [iOS] UIButton title , image vertical align ํ๊ธฐ UIButton๋ฅผ extesionํด์ ์์ ๋ฃ์ด๋๊ณ ์ฌ์ฉํ๋ฉด ํธ๋ฆฌํ๋ค.๐ณ velog.io extension UIButton { func alignTextBelow(spacing: CGFloat = 8.0) { guard let image = self.imageView?.image else { return } guard let titleLabel = self.titleLa.. 2022. 6. 28. [iOS/Swift] UICollectionViewCell ์์๋ณด๊ธฐ ๋ณดํธ๋์ด ์๋ ๊ธ ์ ๋๋ค. 2022. 6. 27. [iOS] Notification Service Extension์ Firebase ์ ๋ฆฌ UNNotificationServiceExtension ์๊ฒฉ ํธ์ ๋ ธํฐํผ์ผ์ด์ ์ ์ปจํ ์ธ ๋ฅผ ์์ ํ๋ ๊ฐ์ฒด. ์ฌ์ฉ์์๊ฒ ์ ๋ฌ๋๊ธฐ ์ ์ ์ํ๋จ class UNNotificationServiceExtension : NSObject notification service ์ฑ ๊ธฐ๋ฅ ํ์ฅ => ์ฌ์ฉ์์๊ฒ remote notification ์ด ์ ๋ฌ๋๊ธฐ ์ด์ ์ ์ปจํ ์ธ ๋ฅผ ์ปค์คํฐ๋ง์ด์ง ํ ์ ์๋ ๊ธฐ๋ฅ UI๋ฅผ ๊ฐ์ง์ง ์์ notification ์ด ์ฌ์ฉ์์ ๊ธฐ๊ธฐ์ ์ ๋ฌ๋๋ฉด ๋ฐ์นญ๋จ notification ์ ๋ด์ฉ์ ์์ ํ๊ฑฐ๋ ์ด๋ฏธ์ง, ๋น๋์ค ๋ฑ์ ๋ค์ด๋ก๋ ๋ฐ์ ์ ์์ผ๋ฉฐ ์ํธํ ํน์ ๋ณตํธํ๋ฅผ ์ํํ ์๋ ์์ silent notification, ์ฌ์ด๋๋ง ์ฌ์์ํค๊ธฐ, ์ฑ ์์ด์ฝ์ ํ์๋๋ ๋ฑ์ง๋ ๋ณ๊ฒฝ ๋ถ๊ฐ UNNotifica.. 2022. 6. 15. [Swift] MVVMC์ Coordinator ์์๋ณด๊ธฐ ๊ธฐ์กด MVVM์์ ํ๋ฉด ์ ํ ๋ก์ง ์ฆ, navigation ๋ก์ง์ ๋งก์ํ๋ Coordinator๊ฐ MVVMC์์ ํต์ฌ์ด์ง ์์๊น ์ถ์ต๋๋ค ๊ทธ๋์ ์ด๋ฒ ํฌ์คํ ์์ Coordinator๊ฐ ๋ฌด์์ด๊ณ Child Coordinator๋ ์ ์ฌ์ฉํ๋์ง ์์๋ณด๊ฒ ์ต๋๋ค! ํน์ ๋ ์ข์ ๋ฐฉ๋ฒ์ด ์๋ค๋ฉด ๊ณต์ ๋ถํ๋๋ ค์!! ๋ง์ฝ MVVMC๊ฐ ์ฒ์์ด๋ผ๋ฉด ์๋ ๊ธ์ ๋จผ์ ๋ณด๊ณ ์ค์๋ฉด ๋์์ด ๋ ๊ฑฐ ๊ฐ์์! 2022.06.11 - [๐ iOS/Architecture Pattern] - [Swift] MVVMC ๊ฐ๋จํ๊ฒ ์์๋ณด๊ธฐ โญ๏ธ ํ๋ฉด ์ ํ์ ๋ด๋นํ๋ Coordinator ์ฐ์ Coordinator๊ฐ ๋ฌด์จ ์ญํ์ ํ๋์ง ์์๋ด ์๋ค! MVC ๋ Massive View Controller๋ผ ๋ถ๋ฆด ๋งํผ ViewController์ ์ญ.. 2022. 6. 14. [Swift] UITextField borderStyle ํ ์คํธ ํ๋ ํ ๋๋ฆฌ ์ค์ UITextField.BorderStyle UITextField์ ํ ๋๋ฆฌ ์ ํ์ ์ค์ ํ ์ ์์ none idTextField.borderStyle = .none default๋ก .none ํ์ ํ ๋๋ฆฌ ์์ญ์ด ์๋ฌด๊ฒ๋ ์ค์ ๋์ง ์์์ฑ ๋ํ๋จ line idTextField.borderStyle = .line ํ ๋๋ฆฌ ์์ญ์ด ํ์ค๋ก ๋ํ๋จ bazel idTextField.borderStyle = .bezel ์ ์ฒด๊ฐ์ด ์๋ ๋ฒ ์ ค ์คํ์ผ๋ก ํ ์คํธ ํ๋ ์์ญ ํ์ ์ ํ์ ์ผ๋ก ๋ฐ์ดํฐ ์ ๋ ฅ์ ๋ฐ๋ ์์ญ์์ ์ฌ์ฉ๋๋ ์คํ์ผ roundedRect idTextField.borderStyle = .roundedRect ๋ผ์ด๋๋ฅผ ๊ฐ์ง ๋ชจ์๋ฆฌ ์คํ์ผ๋ก ํ ์คํธ ํ๋ ์์ญ์ ํ์ํจ idTextField.layer.borderCol.. 2022. 6. 13. [Swift] MVVMC ๊ฐ๋จํ๊ฒ ์์๋ณด๊ธฐ MVVMC ๋ ๊ธฐ์กด MVVM ์ํคํ ์ฒ ํจํด์ Coordinator์ ์ถ๊ฐํ ์กฐํฉ MVVMC, MVVM-C, MVVM Coordinator ํจํด์ด๋ผ๊ณ ๋ ํจ MVVM์์ ํ๋ฉด ์ ํ(navigation) ๊ธฐ๋ฅ์ Coordinator๊ฐ ๋งก์ ์ฒ๋ฆฌํจ MVVM ์ด ์ฒ์์ด๋ผ๋ฉด ๐ 2022.06.07 - [๐ iOS/Architecture Pattern] - [Swift] MVVM ์์ฉํธ MVVM+C ๋ฅผ ๊ตฌํํ๋ ๋ฐฉ๋ฒ์ด ๋ฑ ์ ํด์ ธ ์๋ ๊ฒ์ด ์๋๋ผ Coordinator ์ญํ ์์์ ๊ตฌํํ๋ ๋ฐฉ๋ฒ์ด ๋ค์ํ๊ฒ ์กด์ฌํ๋๋ผ๊ตฌ์ ์๊ฐ๋ณด๋ค ๋ณต์กํ ๋ถ๋ถ๋ค์ด ๋ง์์ ์ด๋ฒ ํฌ์คํ ์์๋ ๊ฐ๋จํ๊ฒ ์ดํด ๋ณด๊ฒ ์ต๋๋ค! ์ฐ์ Coordinator์ ์ญํ ์ดํดํ๊ธฐ! MVVM+C ์ดํด๋ณด๊ธฐ โญ๏ธ Model ๋ฐ์ดํฐ ๊ตฌ์กฐ ์ ์ ์ ํ๋ฆฌ์ผ์ด์ ์์ ํ์ํ .. 2022. 6. 11. [Swift] MVVM ์์ฉํธ RxSwift + MVVM์ ์ฌ์ฉํ๋ค๊ฐ RxSwift๊ฐ ์๋ MVVM์ ์ฌ์ฉํ๋ RxSwift ์ ์ฅ์ ์ด ํ์คํ ๋๊ปด์ง๋๊ฑฐ ๊ฐ์์ ์ ๋ฒ ํฌ์คํ ์์ MVVM์ ๋ํด ๊ฐ๋จํ๊ฒ ์ ๋ฆฌํด ๋์๋๋ฐ ๐ 2022.06.04 - [๐ iOS/Architecture Pattern] - [Swift/Architecture] MVVM ์ดํดํ๊ธฐ MVVM์ Model - View - ViewModel๋ก ๋๋๋ ๊ฒ์ด ๋ค๊ฐ ์๋ View์ ViewModel์ ์ํธ ์์ฉ์ ๋ํด์ ๋ ๊น๊ฒ ๋ค๋ค ๋ณผ ํ์๊ฐ ์์ด์ ์ ๋ฆฌํด ๋ณด์์ต๋๋ค ๐ฆ MVC์ ๋ฌธ์ ์ ๊ธฐ์กด MVC์ ๊ฒฝ์ฐ Massive ViewController์ ์ฝ์์ด๋ค~ ๋ผ๋ ๋ง์ด ์์ ์ ๋๋ก ViewController์ ์ญํ์ด ์ปธ์ต๋๋ค UI๋ฅผ ๋ก๋ํ๊ณ ์ฌ์ฉ์์ ์ด๋ฒคํธ๋ฅผ ๋ฐ๊ณ , ๋น์ฆ.. 2022. 6. 7. [iOS/Swift] UICollectionView scroll animation ๋ณดํธ๋์ด ์๋ ๊ธ ์ ๋๋ค. 2022. 6. 6. [iOS/Swift] UICollectionViewFlowLayout ์์๋ณด๊ธฐ UICollectionViewFlowLayout ๋ ์ด์์ ์ค๋ธ์ ํธ UICollectionViewController์ ์ด๋์ ๋ผ์ด์ ์ ๋๊ฒจ์ฃผ๋ ํ๋ผ๋ฏธํฐ collectionViewLayout ๊ฐ. init(collectionViewLayout: UICollectionViewLayout) ๊ฐ ์น์ ์ ํค๋์ ํธํฐ๋ฅผ ์ต์ ๋ ๊ฐ์ผ๋ก ํ์ฌ ๊ทธ๋ฆฌ๋๋ฅผ ๊ตฌ์ฑํจ @MainActor class UICollectionViewFlowLayout : UICollectionViewLayout collection view layout ํ์ flow layout์ collection view์ ๋ธ๋ฆฌ๊ฒ์ดํธ ์ค๋ธ์ ํธ์ ํจ๊ป ๋์ํ๋ฉฐ ๊ฐ ์น์ ์์ ์์ดํ (์ ), ํค๋, ํธํฐ์ ์ฌ์ด์ฆ๋ฅผ ๊ฒฐ์ ํ๋ ์ญํ์ ํจ ๋ธ๋ฆฌ๊ฒ์ดํธ ์ค๋ธ์ ํธ๋ UICollect.. 2022. 6. 6. [Swift] MVVM ๊ฐ๋จํ๊ฒ ์์๋ณด๊ธฐ ์ ์ ์ค๋ธ์ ํธ๋ฅผ Model, View, ViewModel๋ก ๋ถ๋ฆฌํ๋ ๋์์ธ ํจํด Model ๋ฐ์ดํฐ ๊ตฌ์กฐ ์ ์ ์ ํ๋ฆฌ์ผ์ด์ ์์ ํ์ํ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ง๊ณ ์์ structs ํน์ ์์ฃผ ๊ฐ๋จํ class๋ก ๊ตฌํ View ์ฌ์ฉ์์ ์ํธ ์์ฉํ๊ณ ์ด๋ฒคํธ๊ฐ ๋ฐ์ํ๊ฑฐ๋ ๋ฐ์ดํฐ๋ฅผ ์์ฒญํ ๊ฒฝ์ฐ ViewModel์๊ฒ ์๋ ค์ค UI๋ฅผ ํ์ํ๊ธฐ ์ํ ์ฝ๋๋ฅผ ํฌํจํ๊ณ ์ด ์ธ์ ViewModel์ ์๋ ๋น์ฆ๋์ค ๋ก์ง์ ํธ์ถํ๋ ์ฝ๋๊ฐ ๋ค์ด ์์ ViewModel view๋ก ๋ถํฐ ์ฌ์ฉ์์ ์ํธ์์ฉ์ ๋ฐ๊ณ ์ด์ ๋ง๋ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ๊ฒ ๋จ UIKit ๋ถํ์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ฐ์ดํธ ํ๊ณ ๋ทฐ ์์๋ฅผ ์ ๋ฐ์ดํธํจ model ์ ๋ณด view์ fetch ํ๊ธฐ ์ํด ๊ทธ ๊ฐ์ ๋ณ๊ฒฝ (๋ทฐ์ ๋ณด์ฌ์ฃผ๊ธฐ ์ํด ๋ฐ์ดํฐ ์ฒ๋ฆฌ๋ฅผ ํ๋ค๋ ๋ป) ์ฅ์ ๊ธฐ์กด MVC์์ ๋ง์ .. 2022. 6. 4. [Swift/CoreAnimation] CABasicAnimation ์ด๋ ์ ์ฒด ์ฝ๋ ๋งํฌ ๊ณ์ธต ์์ฑ์ ๋ํ basic, single-keyframe ์ ๋๋ฉ์ด์ ์ ์ ๊ณตํ๋ ๊ฐ์ฒด ๊ฐ์ฒด ์์ฑ let animation = CABasicAnimation(keyPath: "position.x") initializer์ ํตํด keyPath๋ฅผ ์ง์ ํด์ ๊ฐ์ฒด ์์ฑ let animation = CABasicAnimation() animation.keyPath = "position.x" keyPath๋ ๋ฐ๋ก ์ง์ ๊ฐ๋ฅ keyPath var keyPath: String? { get set } receiver๊ฐ ์ ๋๋ฉ์ด์ ํ๋ ํค ํจ์ค๋ฅผ ์ง์ -> opacity, backgroundColor, position ๋ฑ (์ ์คํธ๋ง์ผ๋ก ๋ฐ๋๋ก ํ์๊น ... ใ ใ ) Animatable Properties An.. 2022. 6. 2. [iOS/Swift] UICollectionView paging ๋์ปฅ ๊ฑฐ๋ฆฌ๋ ์ด์ ์์ ํ๊ธฐ ์ด์ ํฌ์คํ ์์ Carousel effect (UICollectionViewController paging)์ ๊ตฌํํ์์ง๋ง ๊ฐ์ ์ฌํญ์ด ์์์ด์! ๋ฐ๋ก ์ฟฐ์ฒ๊ฑฐ๋ฆฌ๋ ์ด์! ํฌ์คํ ์ ๋ชฉ์ ๋ญ๋ผ ์ง์ ์ง๋ ์ ๋งคํ...ใ ใ ใ ์์ ์ํ๊ณ ๊ทธ๋๋ก ์ฐ๊ธฐ์๋ ๋ง์์ ๊ฑธ๋ฆฝ๋๋ค! ๋ฌด์กฐ๊ฑด ์ฌ์ฉ์๊ฐ UI/UX์ ๋ถ๋๋ฌ์์ ๋๋ผ๊ฒ ํด์ฃผ๊ณ ์ถ๋จ ๋ง์ด์ฅฌ ๐ค ์ฌํํผ ์์ ํด ๋ด ์๋ค ์์ฑ๋ ์ฝ๋๋ ์ฌ๊ธฐ ๊นํ๋ธ์์ ๋ค์ด ๋ฐ์ผ์๋ฉด ๋ฉ๋๋ค-> ๊นํ๋ธ๋งํฌ ์ฐ์ ์ด์ ํฌ์คํ ์์ ์์ฑํด ๋์๋ ์ฝ๋๋ฅผ ๊ฐ์ง๊ณ ์์ ๋ก๊ทธ๋ฅผ ์ํด print ๋ฌธ์ ์ถ๊ฐํด ์ฃผ์์ต๋๋ค func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOf.. 2022. 6. 1. ์ด์ 1 ยทยทยท 3 4 5 6 7 8 9 ยทยทยท 11 ๋ค์