Last active
December 5, 2018 05:36
-
-
Save hsleedevelop/7cfe852f617610f0d19621fccea1215f to your computer and use it in GitHub Desktop.
check retain count example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dataSource.dataReloaded | |
| .filter { [dataSource, tableView] in dataSource?.sectionModels.first?.items.isEmpty == false && tableView?.isEditing == false} | |
| .debug(">>>>>>>>>>> CFGetRetainCount >> \(CFGetRetainCount(self))") | |
| .emit(onNext: { [weak self] _ in | |
| guard let self = self, let items = self.dataSource.sectionModels.first?.items else { return } | |
| if self.viewModel.currentPage.page == 1, items.count <= 50 {//라이크 이벤트 발생 시 최상위로 이동 | |
| self.needScrollToTop = false | |
| self.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: UITableViewScrollPosition.top, animated: false) | |
| } | |
| }) | |
| .disposed(by: self.disposeBag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment