private static UIImpactFeedbackStyle Convert(FeedbackStyle feedback) { switch (feedback) { case FeedbackStyle.Medium: return(UIImpactFeedbackStyle.Medium); case FeedbackStyle.Heavy: return(UIImpactFeedbackStyle.Heavy); default: return(UIImpactFeedbackStyle.Light); } }
public void Vibrate(FeedbackStyle feedback = FeedbackStyle.Light) { }
public void Vibrate(FeedbackStyle feedback = FeedbackStyle.Light) { var generator = new UIImpactFeedbackGenerator(Convert(feedback)); generator.ImpactOccurred(); }