public UIView ViewForCardAt(KolodaView koloda, nint index) { return(new UIImageView(UIImage.FromBundle("card_" + (index + 1))) { ContentMode = UIViewContentMode.Center }); }
public NSArray GetAllowedDirectionsForIndex(KolodaView koloda, nint index) { NSNumber[] swipeResultDirections = (new long[] { (long)SwipeResultDirection.Left, (long)SwipeResultDirection.Right, (long)SwipeResultDirection.Up }).Select(x => new NSNumber(x)).ToArray(); return(NSArray.FromObjects(swipeResultDirections)); }
public override void ViewDidLoad() { base.ViewDidLoad(); kolodaView = new KolodaView(View.Frame); View.BackgroundColor = UIColor.Blue; View.Add(kolodaView); kolodaView.SetDataSource(this); kolodaView.SetDelegate(this); // Perform any additional setup after loading the view, typically from a nib. }
public void DraggedCardWithPercentage(KolodaView koloda, nfloat finishPercentage, SwipeResultDirection direction) { }
public bool KolodaShouldTransparentizeNextCard(KolodaView koloda) { return(true); }
public bool KolodaShouldMoveBackgroundCard(KolodaView koloda) { return(true); }
public bool KolodaShouldApplyAppearAnimation(KolodaView koloda) { return(true); }
public void KolodaPanFinished(KolodaView koloda, DraggableCardView card) { }
public static void SetDelegate(this KolodaView kolodaView, IKolodaViewDelegate kolodaViewDelegate) { kolodaView.WeakDelegate = kolodaViewDelegate as NSObject; }
public void DidShowCardAt(KolodaView koloda, nint index) { }
public bool ShouldSwipeCardAt(KolodaView koloda, nint index, SwipeResultDirection direction) { return(true); }
public OverlayView ViewForCardOverlayAt(KolodaView koloda, nint index) { return(new OverlayView()); }
public DragSpeed KolodaSpeedThatCardShouldDrag(KolodaView koloda) { return(DragSpeed.Default); }
public nint KolodaNumberOfCards(KolodaView koloda) { return(5); }
public void KolodaDidResetCard(KolodaView koloda) { }
public void DidSwipeCardAt(KolodaView koloda, nint index, SwipeResultDirection direction) { }
public nfloat KolodaSwipeThresholdRatioMargin(KolodaView koloda) { return(0.5f); }
public void KolodaDidRunOutOfCards(KolodaView koloda) { koloda.ReloadData(); }
public bool ShouldDragCardAt(KolodaView koloda, nint index) { return(true); }
public void DidSelectCardAt(KolodaView koloda, nint index) { System.Diagnostics.Debug.WriteLine(index); }
public static void SetDataSource(this KolodaView kolodaView, IKolodaViewDataSource kolodaViewDataSource) { kolodaView.DataSource = kolodaViewDataSource as NSObject; }
public void KolodaPanBegan(KolodaView koloda, DraggableCardView card) { }