Esempio n. 1
0
        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)
 {
 }
Esempio n. 3
0
        public void Vibrate(FeedbackStyle feedback = FeedbackStyle.Light)
        {
            var generator = new UIImpactFeedbackGenerator(Convert(feedback));

            generator.ImpactOccurred();
        }