示例#1
0
        public void ScrollToTop()
        {
            if (ReportsTableView == null)
            {
                return;
            }

            var point = new CGPoint(0, -ReportsTableView.ContentInset.Top);

            ReportsTableView.SetContentOffset(point, true);
        }
示例#2
0
        private void onReportsTableScrolled(object sender, CGPoint offset)
        {
            if (CalendarIsVisible)
            {
                var topConstant = (TopCalendarConstraint.Constant + offset.Y).Clamp(0, calendarHeight);
                TopCalendarConstraint.Constant = topConstant;

                if (topConstant == 0)
                {
                    return;
                }

                // we need to adjust the offset of the scroll view so that it doesn't fold
                // under the calendar while scrolling up
                var adjustedOffset = new CGPoint(offset.X, ReportsTableView.ContentOffset.Y - offset.Y);
                ReportsTableView.SetContentOffset(adjustedOffset, false);
                View.LayoutIfNeeded();

                if (topConstant == calendarHeight)
                {
                    HideCalendar();
                }
            }
        }
示例#3
0
        public void ScrollToTop()
        {
            var point = new CGPoint(0, -ReportsTableView.ContentInset.Top);

            ReportsTableView.SetContentOffset(point, true);
        }