public override void ViewDidLayoutSubviews()
        {
            base.ViewDidLayoutSubviews();

            if (calendarInitialized)
            {
                return;
            }

            calendarCollectionViewSource.DecelerationEndedObservable
            .Subscribe(ViewModel.SetCurrentPage)
            .DisposedBy(disposeBag);

            ViewModel.CurrentPageObservable
            .Subscribe(CalendarCollectionView.Rx().CurrentPageObserver())
            .DisposedBy(disposeBag);

            calendarInitialized = true;
        }
        public override void ViewDidLayoutSubviews()
        {
            base.ViewDidLayoutSubviews();

            if (calendarInitialized) return;

            calendarCollectionViewSource.CurrentPageNotScrollingObservable
                .Subscribe(ViewModel.SetCurrentPage)
                .DisposedBy(disposeBag);

            calendarCollectionViewSource.CurrentPageWhileScrollingObservable
                .Subscribe(ViewModel.UpdateMonth)
                .DisposedBy(disposeBag);

            ViewModel.CurrentPageObservable
                .Subscribe(CalendarCollectionView.Rx().CurrentPageObserver())
                .DisposedBy(disposeBag);

            calendarInitialized = true;
        }
Пример #3
0
        public override void ViewDidLayoutSubviews()
        {
            base.ViewDidLayoutSubviews();

            if (calendarInitialized)
            {
                return;
            }

            calendarCollectionViewSource.CurrentPageNotScrollingObservable
            .Subscribe(ViewModel.SetCurrentPage)
            .DisposedBy(DisposeBag);

            calendarCollectionViewSource.CurrentPageWhileScrollingObservable
            .Subscribe(ViewModel.UpdateMonth)
            .DisposedBy(DisposeBag);

            ViewModel.CurrentPageObservable
            .ObserveOn(IosDependencyContainer.Instance.SchedulerProvider.MainScheduler)
            .Subscribe(CalendarCollectionView.Rx().CurrentPageObserver())
            .DisposedBy(DisposeBag);

            calendarInitialized = true;
        }