[SeSAC] September 17, 2023

✔︎ 오늘의 정리
  • Localization
  • 디자인 패턴(MVC / MVP / MVVM)
  • CollectionView
  • SwipeAction

 

 


Localization

단순히 언어를 다른 나라의 언어로 번역한다! 에서 그치지 않고 그 나라의 언어는 물론, 문화나 특성에 따라서 앱의 화면 구성이나 번역, 숫자 포맷을 다르게 설정하는 것을 말한당.

그 종류를 따지자면 해당 나라별로 정말 천차만별이고 정리하자면 이것도 끝도 없겠어서~~!!!!!

WWDC 영상과 애플 문서로 대체한다. 심심할 때마다 하나씩 보고 있는데 조은듯...

 

https://developer.apple.com/documentation/xcode/localizing-package-resources

 

Localizing package resources | Apple Developer Documentation

Ensure that your Swift package provides localized resources for many locales.

developer.apple.com

https://developer.apple.com/videos/play/wwdc2020/10160/

 

Formatters: Make data human-friendly - WWDC20 - Videos - Apple Developer

Save yourself time and frustration: When you display data in your app — including dates, times, measurements, names, lists, numbers, or...

developer.apple.com

https://developer.apple.com/videos/play/wwdc2022/10107/

 

Get it right (to left) - WWDC22 - Videos - Apple Developer

Discover how to develop your app so that it can be localized into

developer.apple.com

 

 

 

 

 

디자인 패턴(MVC / MVVM / MVP)

디자인 패턴은 대충 뭔지 알고 있는데 개념을 완벽하게 정리하는 것보다 이해하고 잘 사용할 줄 아는 게 중요한 거 가타서 나중에 써보려고 한다!!

https://jminie.tistory.com/168

 

안드로이드 [Kotlin] - 아키텍처 패턴 with MVC, MVP, MVVM (feat 코드 예제)

MVP/MVVM/Clean Architecture 등 아키텍처 설계 혹은 적용 경험이 있으신 분 안드로이드 채용 공고를 보다 보면 어렵지 않게 볼 수 있는 글들이다. 오늘은 안드로이드 아키텍처패턴으로 많이 언급되는 MV

jminie.tistory.com

https://beomy.tistory.com/43

 

[디자인패턴] MVC, MVP, MVVM 비교

웹 개발자로 일을 하면서 가장 먼저 접한 디자인패턴이 바로 MVC 패턴이었습니다. 그만큼 유명하고 많이 쓰이는 디자인패턴인 MVC 패턴과 MVC 패턴에서 파생되어져 나온 MVP 패턴과 MVVM 패턴을 이야

beomy.tistory.com

 

 

 

 

 

 

Advanced in CollectionView

CollectionView는 iOS6부터 등장하여 iOS13까지 index 기반으로 화면을 구성했다. 

이제는 익숙한 (ㅋㅋ)  UICollectionViewDataSource 프로토콜을 채택하여 Data를 구성하고, FlowLayout을 통해 CollectionView를 구성한다.

 

그러니까, 기존에 CollectionView를 구성했던 중요한 부분은...

 

 

추후... 글로 다시 정리......

 

 

 

더보기

CollectionViews: https://developer.apple.com/documentation/uikit/views_and_controls/collection_views

 

Collection views | Apple Developer Documentation

Display nested views using a configurable and highly customizable layout.

developer.apple.com

 

Implementing Modern Collection Views: https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/implementing_modern_collection_views

 

Implementing Modern Collection Views | Apple Developer Documentation

Bring compositional layouts to your app and simplify updating your user interface with diffable data sources.

developer.apple.com

 

Updating Collection Views Using Diffable Data Sources: https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/updating_collection_views_using_diffable_data_sources

 

Updating Collection Views Using Diffable Data Sources | Apple Developer Documentation

Streamline the display and update of data in a collection view using a diffable data source that contains identifiers.

developer.apple.com

 

 

Advances in UICollectionView: https://developer.apple.com/videos/play/wwdc2020/10097/?time=141

 

Advances in UICollectionView - WWDC20 - Videos - Apple Developer

Learn about new features of UICollectionView that make it easier to use and unlock powerful new functionality. We'll show you how to use...

developer.apple.com

 

Advances in UI Data Sources: https://developer.apple.com/videos/play/wwdc2019/220

 

Advances in UI Data Sources - WWDC19 - Videos - Apple Developer

Use UI Data Sources to simplify updating your table view and collection view items using automatic diffing. High fidelity, quality...

developer.apple.com

 

Advances in diffable data sources: https://developer.apple.com/videos/play/wwdc2020/10045

 

Advances in diffable data sources - WWDC20 - Videos - Apple Developer

Diffable data sources dramatically simplify the work involved in managing and updating collection and table views to create dynamic and...

developer.apple.com

 

Advances in Collection View Layout: https://developer.apple.com/videos/play/wwdc2019/215

 

Advances in Collection View Layout - WWDC19 - Videos - Apple Developer

Collection View Layouts make it easy to build rich interactive collections. Learn how to make dynamic and responsive layouts that range...

developer.apple.com

 

Lists in UICollectionView: https://developer.apple.com/videos/play/wwdc2020/10026

 

Lists in UICollectionView - WWDC20 - Videos - Apple Developer

Learn how to build lists and sidebars in your app with UICollectionView. Replace table view appearance while taking advantage of the full...

developer.apple.com

 

Modern cell configuration: https://developer.apple.com/videos/play/wwdc2020/10027/

 

Modern cell configuration - WWDC20 - Videos - Apple Developer

Discover new techniques for configuring collection view and table view cells to quickly build dynamic interfaces in your app. Explore...

developer.apple.com

 

 

 

 

 

 

Swipe Action

복습하다보니 이게 뭐더라?! 싶은데 보니까 SwipeAction이드라

ㅋㅋ 분명 이렇게 놔두면 흐르는 코드가 되어 나중에는 기억도 안 나겟지 싶어서 일단 같이 올려둔다........

    func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
        
        let liked = UIContextualAction(style: .normal, title: "") { action, view, completionHandler in
            print("조아요 선택")
        }
        let cancel = UIContextualAction(style: .destructive, title: "") { action, view, completionHandler in
            print("시러요 선택")
        }
        
        liked.backgroundColor = .orange
        liked.image = UIImage(systemName: "hand.thumbsup.fill")
        // like.image = tasks[indexPath.row].diaryLike ? UIImage(systemName: "star.fill") : UIIImage(systemName: "star")
        
        cancel.image = UIImage(systemName: "hand.thumbsdown.fill")
        
        return UISwipeActionsConfiguration(actions: [liked, cancel])
        
        
    }

    func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
        
        let liked = UIContextualAction(style: .normal, title: "") { action, view, completionHandler in
            print("조아요 선택")
        }
        let cancel = UIContextualAction(style: .destructive, title: "") { action, view, completionHandler in
            print("시러요 선택")
        }
        
        liked.backgroundColor = .orange
        liked.image = UIImage(systemName: "hand.thumbsup.fill")
        // like.image = tasks[indexPath.row].diaryLike ? UIImage(systemName: "star.fill") : UIIImage(systemName: "star")
        
        cancel.image = UIImage(systemName: "hand.thumbsdown.fill")
        
        return UISwipeActionsConfiguration(actions: [liked, cancel])
        
    }

 

 

 

아니!! 자꾸 작성하는 걸 미루다 보니 한도끝도없이미뤄졌다......

그래서 그냥......... 놓아주려고한다................

diffable................. 나중에 CollectionView의 변천사 혹은 진화로 글을 써주고말겠다

지금 프로젝트 기획하고 MVVM / Router 패턴 같이 적용시켜 보고 있는데 넘잼따

암튼그거해야댐 이번 주말에 블로그 뽀갠다 ㄱ.ㄱ

'TIL' 카테고리의 다른 글

[SeSAC] October 7, 2023  (0) 2023.10.07
[SeSAC] October 3, 2023  (3) 2023.10.04
[SeSAC] September 7, 2023  (0) 2023.09.07
[SeSAC] September 4, 2023  (2) 2023.09.07
[SeSAC] September 1, 2023  (0) 2023.09.02