我得到错误消息:expected ':'
可能是因为下面的短语initWithTitle:@"You downloaded %i boards", iboard
。你能帮我修一下吗?
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You downloaded %i boards", iboard message:@"Press Ok to continue" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
Replace
initWithTitle:@"You downloaded %i boards", iboard
initWithTitle:[NSString stringWithFormat:@"You downloaded %i boards", iboard]
你的代码搞得一团糟。
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You downloaded %i boards", iboard message:@"Press Ok to continue" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
应该是:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"You downloaded %i boards", iboard]
message:@"Press Ok to continue"
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];