iOS Dev/ReactorKit
-
[ReactorKit#5] Example : RxTodo 구조 분석[미완]iOS Dev/ReactorKit 2020. 6. 21. 02:35
이번에 따라해볼 코드는 https://github.com/devxoul/RxTodo devxoul/RxTodo iOS Todo Application using RxSwift and ReactorKit. Contribute to devxoul/RxTodo development by creating an account on GitHub. github.com RxTodo이다! 간단히 설명을 하자면 +버튼을 누르면 테이블 뷰 최상단에 셀이 하나 삽입되게, Edit버튼을 누르면 셀 삭제, 셀 위치 이동, 셀 편집을 할 수 있게 하는 것이다. 셀을 클릭하면 체크표시가 나타난다. 우선 코드를 보기 전에 프로젝트 구성이 교과서적으로 깔끔하게 되어있어서 한번 자세히 보고 넘어가려 한다. 최상단 폴더인 RxTodo에는 세..
-
[ReactorKit#4] Example : GithubSearch 코드작성 (스토리보드 없이)iOS Dev/ReactorKit 2020. 6. 7. 16:22
새 프로젝트 GithubSearch-Prac을 만들고 Source Control Navigator에서 Remotes를 우클릭해 Create Remote해서 깃허브에 연결해둔다. 저번 Counter과 마찬가지로 Storyboard 없이 작업할 것이기 때문에 #2번 포스트에서도 한 작업을 똑같이 해준다. 스토리보드 두개 지우고, 프로젝트 정보에서도 Main interface 부분 비우고, info.plist에서도 storyboard name 행을 지웠다. 커밋 추가(message : storyboard 삭제) 필요한 pod파일들도 설치해준다. GithubSearchViewReactor를 만들어주고, 코드 작성을 시작한다. // // GithubSearchViewReactor.swift // GithubSea..
-
[ReactorKit#3] Example : GithubSearch 구조 분석iOS Dev/ReactorKit 2020. 6. 7. 13:36
두번째 Example인 GithubSearch. https://github.com/ReactorKit/ReactorKit/tree/master/Examples/GitHubSearch 첫번째 Example인 Counter보다 난이도가 확 올라갔다. 이 앱은 Github의 API를 이용해서 제목을 입력하면 해당 제목과 매칭되는 레포지토리를 테이블 뷰에 띄워주는 앱이다. 입력할때마다 실시간으로 검색을 하고, 검색결과 cell을 클릭하면 safari 웹사이트로 디테일을 띄우는 방식이다. GitHubSearchViewReactor 구조 : Action : updateQuery(String?) - 업데이트 액션 loadNextPage - 다음 페이지 로드 액션 Mutation : setQuery(String?) -..
-
[ReactorKit#2] Example : Counter 코드작성 (스토리보드 없이)iOS Dev/ReactorKit 2020. 6. 7. 02:42
https://github.com/chongin12/Counter-Prac Observable { switch action { case .increase: return Observable.concat([ Observable.just(Mutation.isLoading(true)), Observable.just(Mutation.increaseValue), Observable.just(Mutation.isLoading(false)) ]) case .decrease: return Observable.concat([ Observable.just(Mutation.isLoading(true)), Observable.just(Mutation.decreaseValue), Observable.just(Mutation.is..
-
[ReactorKit#1] Example : Counter 구조 분석iOS Dev/ReactorKit 2020. 6. 6. 02:49
우선 첫번째 Example인 Counter. https://github.com/ReactorKit/ReactorKit/tree/master/Examples/Counter 여기서 확인할 수 있다. 새로운 프로젝트를 만들고 Github에 Remote를 연결했다. https://github.com/chongin12/Counter-Prac chongin12/Counter-Prac ReactorKit Example Counter Practice. Contribute to chongin12/Counter-Prac development by creating an account on GitHub. github.com 우선 Example에 있는 Counter 코드를 한번 살펴보고, 구조를 분석한 다음 코드를 약간씩 참고..
-
[ReactorKit#0] ReactorKit 시작하기iOS Dev/ReactorKit 2020. 6. 5. 15:52
ReactorKit을 혼자 독학해보려 한다. https://github.com/ReactorKit/ReactorKit ReactorKit/ReactorKit A library for reactive and unidirectional Swift applications - ReactorKit/ReactorKit github.com 여기 ReadMe를 읽어보고, Example에 있는 Counter, GithubSearch를 그대로 구현해보려 한다. 그대로 따라하면 재미 없으니깐 스토리보드 없이 SnapKit을 활용하여 짜보려고 한다. ReadMe를 한번 읽어봤다. Advanced 이전 내용만 정리를 해보자면, 전체적인 플로우는 View -> Reactor ->View -> ... 이런식이다. 좀 더 자세히 말..