用于輸入分鐘或秒的iOS控件:DDHTimerControl
DDHTimerControl 是一個用來輸入分鐘數和秒數控件,是UIControl 子類。
用法
DDHTimerControl *timerControl = [DDHTimerControl timerControlWithType:DDHTimerTypeEqualElements];
timerControl.translatesAutoresizingMaskIntoConstraints = NO;
timerControl.color = [UIColor orangeColor];
timerControl.highlightColor = [UIColor redColor];
timerControl.minutesOrSeconds = 11;
timerControl.titleLabel.text = @"min";
timerControl.userInteractionEnabled = NO;
[contentView addSubview:timerControl];
目前,有支持的三種類型:
/**
* Type of the timer ring
*/
typedef NS_ENUM(NSUInteger, DDHTimerType) {
/**
* The ring looks like a clock
*/
DDHTimerTypeElements = 0,
/**
* All the elements are equal
*/
DDHTimerTypeEqualElements,
/**
* The ring is a solid line
*/
DDHTimerTypeSolid,
/**
* The number of the different types
*/
DDHTimerTypeNumberOfTypes
};
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!