示例#1
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            TKGaugeNeedle needle = this.radialGauge.ScaleAtIndex(0).IndicatorAtIndex(0) as TKGaugeNeedle;

            needle.SetValue(60, 0.5f, CAMediaTimingFunction.EaseInEaseOut);
            needle = this.linearGauge.ScaleAtIndex(0).IndicatorAtIndex(0) as TKGaugeNeedle;
            needle.SetValue(1.8f, 0.7f, CAMediaTimingFunction.EaseInEaseOut);
        }
示例#2
0
        public void SegmentTouched(UISegmentedControl source)
        {
            nfloat value = nfloat.Parse(this.segments[source.SelectedSegment]);

            TKGaugeNeedle needle = this.radialGauge.ScaleAtIndex(0).IndicatorAtIndex(0) as TKGaugeNeedle;

            needle.SetValue(value,
                            0.5f,
                            CAMediaTimingFunction.EaseInEaseOut);

            needle = this.linearGauge.ScaleAtIndex(0).IndicatorAtIndex(0) as TKGaugeNeedle;
            needle.SetValue((value / 180) * 7.0f, 0.5f, CAMediaTimingFunction.EaseInEaseOut);
        }