[英]how to fix xcode warning “Expression result unused” in xcode 4 for UIActivityIndicatorView
i am getting a warning for 我收到警告
spinner.hidesWhenStopped;
warning : Expression result unused 警告:表达式结果未使用
hope any one know this 希望任何人都知道
Thank you very much 非常感谢你
Well hidesWhenStopped
is a property of spinner
and you don't do anything with it. 好的hidesWhenStopped
是spinner
的属性,您无需对其进行任何操作。 Try setting a value as in 尝试像这样设置一个值
spinner.hidesWhenStopped = YES;
or 要么
spinner.hidesWhenStopped = NO;
It seems you are trying to set the activity indicator to hide when stopped animating. 似乎您正在尝试将活动指示器设置为在停止动画时隐藏。 The line spinner.hidesWhenStopped
doesn't call the setter method. spinner.hidesWhenStopped
行不调用setter方法。 If you want to call the setter method you have to either use, 如果您要调用setter方法,则必须使用其中一种方法,
spinner.hidesWhenStopped = YES;
or, 要么,
[spinner setHidesWhenStopped:YES];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.