Programming/Todo(App)
-1- swift에서는 pch가 없다. 싱글톤으로!
몽롱한상태
2020. 10. 24. 21:08
하려고 했던 것-
앱에 사용되는 고정된 텍스트들을 하나의 파일 안에 넣어서 어떤 코드 부분에서도 접근 가능하게 하고자 했음.
-> object-c로 된 이전 프로젝트에서 .pch라는 게 기억남
swift에서도 pch파일 혹은 같은 역할을 하는 것이 있는지 찾아봤다. 하지만...
stackoverflow.com/questions/31648610/what-is-an-alternative-to-pch-in-swift
stackoverflow.com/questions/25113256/why-pch-file-not-available-in-swift
결론 - 싱글톤으로 구현