public void SetFlashCard(UIViewAnimationTransition transition) { if (currentFlashCard < 0) { currentFlashCard = FlashCards.Count - 1; } else if (currentFlashCard >= FlashCards.Count) { currentFlashCard = 0; } FlashCard newFlashCard = FlashCards[currentFlashCard]; if (FlashCardView != null && newFlashCard == FlashCardView.Flashcard) { return; } UIView.BeginAnimations("swipe"); UIView.SetAnimationDuration(1.25); UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut); UIView.SetAnimationTransition(transition, this.View, false); FlashCardView.RemoveFromSuperview(); FlashCardView = new FlashCardView(newFlashCard); this.View.AddSubview(FlashCardView); UIView.CommitAnimations(); }
public override void ViewDidLoad() { base.ViewDidLoad(); FlashCardView = new FlashCardView(FlashCards[currentFlashCard]); FlashCardView.Frame = this.View.Bounds; this.View.AddSubview(FlashCardView); }
public void SetFlashCard(UIViewAnimationTransition transition) { if(currentFlashCard <0) currentFlashCard = FlashCards.Count - 1; else if(currentFlashCard >= FlashCards.Count) currentFlashCard = 0; FlashCard newFlashCard = FlashCards[currentFlashCard]; if(FlashCardView != null && newFlashCard == FlashCardView.Flashcard) return; UIView.BeginAnimations ("swipe"); UIView.SetAnimationDuration (1.25); UIView.SetAnimationCurve (UIViewAnimationCurve.EaseInOut); UIView.SetAnimationTransition (transition, this.View, false); FlashCardView.RemoveFromSuperview (); FlashCardView = new FlashCardView(newFlashCard); this.View.AddSubview (FlashCardView); UIView.CommitAnimations (); }
public override void ViewDidLoad() { base.ViewDidLoad (); FlashCardView = new FlashCardView(FlashCards[currentFlashCard]); FlashCardView.Frame = this.View.Bounds; this.View.AddSubview(FlashCardView); }