9주차 iOS - 2021.10.17 ~ 2021.10.23

2022. 4. 26. 15:07오늘하루 개발 일지

ADD) Theme View 추가


기존에 있던 View에 Section을 나눠서 Theme Cell을 추가하였다.

Section을 분리하여 ThemeCell, AppearanceCell의 Selection 이벤트를 분리하였고 update를 한 다음 TableView를 Refresh 해주었다.

또한 기존의 AppearanceCell 처럼 UserDefault를 통해 값을 저장하고 App이 Launch가 진행 중일 때 테마 값을 변경하도록 해 주었으며 RxTheme의 ThemeService의 switch를 이용해 기존에 지정해놨던 Theme의 프리셋 중 하나로 변경할 수 있도록 제작하였다.

  • 아직 RxDataSource + ReactorKit을 쓰는 방법에 익숙해지지 않은 것 같다. 그래서 조금 더 효율적으로 쓸 수 있는 방법을 연구해봐야겠다.
  • 추가 : 이걸 사용하면 조금 더 깔끔하게 정리할 수 있을 것 같았다. ReactorKit의 제작자이신 전수열님께서 직접 만드신 라이브러리라 크게 심각한 이슈가 터질 것 같지도 않았고 빠른 수정이 가능하실 것 같아 나중에 이 라이브러리로의 전환도 고려해보아야겠다.

https://github.com/devxoul/SectionReactor

 

GitHub - devxoul/SectionReactor: A ReactorKit extension for managing table view and collection view sections with RxDataSources

A ReactorKit extension for managing table view and collection view sections with RxDataSources - GitHub - devxoul/SectionReactor: A ReactorKit extension for managing table view and collection view ...

github.com