public CalendarCollectionViewZoomHelper(UICollectionView collectionView, CalendarCollectionViewLayout layout) { Ensure.Argument.IsNotNull(collectionView, nameof(collectionView)); Ensure.Argument.IsNotNull(layout, nameof(layout)); this.layout = layout; pinchGestureRecognizer = new UIPinchGestureRecognizer(onPinchUpdated); pinchGestureRecognizer.Delegate = this; collectionView.AddGestureRecognizer(pinchGestureRecognizer); }
protected CalendarCollectionViewAutoScrollHelper( UICollectionView collectionView, CalendarCollectionViewLayout layout) { Ensure.Argument.IsNotNull(layout, nameof(layout)); Ensure.Argument.IsNotNull(collectionView, nameof(collectionView)); Layout = layout; CollectionView = collectionView; autoScrollAmount = Layout.HourHeight / 4; }
public CalendarCollectionViewEditItemHelper( UICollectionView CollectionView, ITimeService timeService, CalendarCollectionViewSource dataSource, CalendarCollectionViewLayout Layout) : base(CollectionView, Layout) { Ensure.Argument.IsNotNull(timeService, nameof(timeService)); Ensure.Argument.IsNotNull(dataSource, nameof(dataSource)); this.timeService = timeService; this.dataSource = dataSource; longPressGestureRecognizer = new UILongPressGestureRecognizer(onLongPress); longPressGestureRecognizer.Delegate = this; CollectionView.AddGestureRecognizer(longPressGestureRecognizer); panGestureRecognizer = new UIPanGestureRecognizer(onPan); panGestureRecognizer.Delegate = this; tapGestureRecognizer = new UITapGestureRecognizer(onTap); tapGestureRecognizer.Delegate = this; scalingEndedSubscription = Layout.ScalingEnded.Subscribe(onLayoutScalingEnded); }