[英]iphone UIProgressView disappears on update
Im updating a UIProgressView called “ammo”. 我正在更新一个名为“ ammo”的UIProgressView。 When i update the progress the UIProgressView disappears from the UIView like its being hidden or moved behind another view.
当我更新进度时,UIProgressView从UIView中消失,就像它被隐藏或移到另一个视图后面一样。
Code 码
- (void)updateAmmo:(float) inputAmmo capacity:(float)inputCapacity{
//Calculate the progress value
float value = inputAmmo/inputCapacity;
//If nothing has changed don’t update
if(value != ammo.progress){
[ammo setProgress:value];
}
}
Things I have checked 我检查过的东西
Logging value extracts 记录值提取
Thanks in advance for any assistance. 在此先感谢您的协助。
if u use IB for progress creation checkout ur connect with them. 如果您使用IB进行进度创建结帐,请与他们联系。
i suspect about ur value property goes to immediately to 0 or below 0 我怀疑您的价值属性会立即变为0或低于0
- (void)updateAmmo:(float) inputAmmo capacity:(float)inputCapacity{
float value = inputAmmo/inputCapacity;
if(value != [ammo progress]){
[ammo setProgress:value];
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.