如何禁用或隐藏UIActivityIndicatorView中的指标?
public class ActivityView : UIActivityIndicatorView {
public ActivityView (CGRect frame) : base (frame){
}
public bool IsLoading {
get {
return !this.Hidden;
}
set {
if (value) {
this.Hidden = false;
this.StartAnimating ();
} else {
this.StopAnimating ();
}
}
}
}
答案 0 :(得分:0)
只需添加:
this.TintColor = UIColor.Clear;
this.Color = UIColor.Clear;
在此部分:
if (value) {
...
this.TintColor = UIColor.Clear;
this.Color = UIColor.Clear;
}