开发者

Random Number Generator

开发者 https://www.devze.com 2022-12-30 22:58 出处:网络
- (IBAction)randomnum{ int ra开发者_开发知识库ndomNumber1 = 1+ arc4random() %(49); label1.text = [NSString stringWithFormat:@\"d\", randomNumber];
- (IBAction)randomnum{
int ra开发者_开发知识库ndomNumber1 = 1+ arc4random() %(49);
label1.text = [NSString stringWithFormat:@"d", randomNumber];

Warning:

Local declaration of randomNumber hides instance variable.

How can i get round this warning?


You had some instance variable of the class with the same name of your randomNumber1 or randomNumber. Recheck for that and change the name, you would be fine

0

精彩评论

暂无评论...
验证码 换一张
取 消