ios弧形进度条_IOS 自定义圆形进度条UISlider

本文介绍了如何在iOS中自定义圆形进度条UISlider,包括UICircularSlider的属性和方法,如设置颜色、值域等,并提供了绘制圆环和饼图样式进度条的实现细节。
摘要由CSDN通过智能技术生成

IOS 自定义圆形进度条UISlider

发布时间:2020-04-18 18:02:04

来源:51CTO

阅读:1099

#import

/** @name Constants */

/**

* The styles permitted for the circular progress view.

*

* You can set and retrieve the current style of progress view through the progressViewStyle property.

*/

typedef enum {

UICircularSliderStyleCircle,

UICircularSliderStylePie,

} UICircularSliderStyle;

@interface UICircularSlider : UIControl

/**

* The current value of the receiver.

*

* Setting this property causes the receiver to redraw itself using the new value.

* If you try to set a value that is below the minimum or above the maximum value, the minimum or maximum value is set instead. The default value of this property is 0.0.

*/

@property (nonatomic) float value;

/**

* The minimum value of the receiver.

*

* If you change the value of this property, and the current value of the receiver is below the new minimum, the current value is adjusted to match the new minimum value automatically.

* The default value of this property is 0.0.

*/

@property (nonatomic) float minimumValue;

/**

* The maximum value of the receiver.

*

* If you change the value of this property, and the current value of the receiver is above the new maximum, the current value is adjusted to match the new maximum value automatically.

* The default value of this property is 1.0.

*/

@property (nonatomic) float maximumValue;

/**

* The color shown for the portion of the slider that is filled.

*/

@property(nonatomic, retain) UIColor *minimumTrackTintColor;

/**

* The color shown for the portion of the slider that is not filled.

*/

@property(nonatomic, retain) UIColor *maximumTrackTintColor;

/**

* The color used to tint the standard thumb.

*/

@property(nonatomic, retain) UIColor *thumbTintColor;

/**

* Contains a Boolean value indicating whether changes in the sliders value generate continuous update events.

*

* If YES, the slider sends update events continuously to the associated target’s action method.

* If NO, the slider only sends an action event when the user releases the slider’s thumb control to set the final value.

* The default value of this property is YES.

*

* @warning Not implemented Yet.

*/

@property(nonatomic, getter=isContinuous) BOOL continuous;

/**

* The current graphical style of the receiver.

*

* The value of this property is a constant that specifies the style of the slider.

The default style is UICircularSliderStyleCircle.

* For more on these constants, see UICircularSliderStyle.

*/

@property (nonatomic) UICircularSliderStyle sliderStyle;

@end

/** @name Utility Functions */

#pragma mark - Utility Functions

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值