본문 바로가기

먐

검색하기
먐
프로필사진 김먐

  • 분류 전체보기 (21)
    • CS (0)
      • OS (0)
      • network (0)
    • iOS (0)
      • 문법 (17)
      • 아카이브 (3)
      • 트러블슈팅 (0)
      • RxSwift (1)
    • 기타 (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/12   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록iOS/RxSwift (1)

먐

[RxSwift] Share Subscription

RxSwift에서는 기본적으로 subscribe를 하면 항상 새로운 시퀀스가 시작된다.의도하지 않았다면 엄청난 리소스 낭비이다. 모든 구독자가 하나의 시퀀스를 공유하게 하고 싶을 때는 어떻게 해야 할까?여러 가지 방법이 존재한다.multicastpublishreplayrefCountshare 1. multicast public func multicast(_ subject: Subject) -> ConnectableObservable where Subject.Observer.Element == Element { ConnectableObservableAdapter(source: self.asObservable(), makeSubject: { subject }) }파라미터 ..

iOS/RxSwift 2024. 5. 27. 16:26
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바