UIProgressView

<span style="font-size:24px;">UIProgressView和UIActivityIndicator有些类似</span><div>
</div><div>但是不同之处在于,</div><div>UIProgressView能够更加精确的反应进度</div><div>UIActivityIndicator则只能表示事物在进行中</div><div>
</div><div>有一个例子是在Mail程序中当在下载信息的时候,有一个UIProgressView显示在底部</div><div>
</div><div>初始化方法</div><div><span style="font-family:Courier, Consolas, monospace;line-height: normal; background-color: rgb(255, 255, 255);">- (id)initWithProgressViewStyl<wbr>e:(</wbr></span><a target=_blank href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIProgressView_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UIProgressViewStyle">UIProgressViewStyle</a><span style="font-family:Courier, Consolas, monospace;line-height: normal; background-color: rgb(255, 255, 255);">)</span><em style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; background-color: rgb(255, 255, 255);">style</em></div><div>
</div><div><span style="line-height: normal;">UIProgressViewStyle有两个枚举变量</span></div><div><span style="line-height: normal;">1.UIProgressViewStyleDefau<wbr>lt  <wbr>  <wbr> <wbr> <wbr> <wbr></wbr></wbr></wbr></wbr></wbr></wbr></span></div><div><a target=_blank href="http://photo.blog.sina.com.cn/showpic.html#blogid=5aeb9f7b0101dv7x&url=http://s7.sinaimg.cn/orignal/5aeb9f7bxd02cd09c0256" target="_blank"><img src="http://s7.sinaimg.cn/mw690/5aeb9f7bxd02cd09c0256&690" name="image_operate_82651354795663407" alt="UIProgressView的使用" title="UIProgressView的使用" width="110" height="30" /></a></div><div>
</div><div><span style="line-height: normal;">2. UIProgressViewStyleBar<em><span style="color:#FFC20E;">一般用于toolbar</span></em></span></div><div><a target=_blank href="http://photo.blog.sina.com.cn/showpic.html#blogid=5aeb9f7b0101dv7x&url=http://s14.sinaimg.cn/orignal/5aeb9f7bxd02cd2804ded" target="_blank"><img src="http://s14.sinaimg.cn/mw690/5aeb9f7bxd02cd2804ded&690" name="image_operate_72011354795663350" alt="UIProgressView的使用" title="UIProgressView的使用" width="114" height="35" /></a></div><div>
</div><div>配置UIProgressView</div><div>progressViewStyle 属性</div><div>progressTintColor 属性填充部分的颜色(譬如进度到30%,那么30%部分的颜色就是这个属性)<em style="line-height: normal;"><span style="color:#FFC20E;">iOS5新增</span></em></div><div>progressImage 属性,填充部分的图片,设置图片之后progressTintColor无效,<em style="line-height: normal;"><span style="color:#FFC20E;">iOS5新增</span></em></div><div>trackTintColor 属性,未<span style="line-height: 21px;">填充部分的颜色 <wbr></wbr></span><em style="line-height: normal;"><span style="color:#FFC20E;">iOS5新增</span></em></div><div>trackImage <wbr><span style="line-height: 21px;">属性,未</span><span style="line-height: 21px;">填充部分的图片,设置图片后trackTintColor无效 <wbr></wbr></span><em style="line-height: normal;"><span style="color:#FFC20E;">iOS5新增</span></em></wbr></div><div><span style="color:#FFC20E;"><span style="line-height: normal;"><em>
</em></span></span></div><div><span style="line-height: normal;">管理UIProgressView
</span>progress 属性当前进度值</div><div><span style="font-family:Courier, Consolas, monospace;line-height: normal; background-color: rgb(255, 255, 255);">- (void)setProgress:(float)</span><em style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; background-color: rgb(255, 255, 255);">progress</em><span style="font-family:Courier, Consolas, monospace;line-height: normal; background-color: rgb(255, 255, 255);"> <wbr>animated:(BOOL)</wbr></span><em style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; background-color: rgb(255, 255, 255);">animated</em></div><div><em style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; background-color: rgb(255, 255, 255);">设置当前进度值 <wbr><span style="color:#FFC20E;">iOS5新增</span></wbr></em></div>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值