在 [currentValue, targetValue, difference] 方面需要帮助;线。它说初始化元素不是编译时元素。请发布解决方案。
NSString *message = [NSString stringWithFormat:
@"The value of the slider is: %d\nThe target value is: %d\nThe difference is: %d",
[currentValue, targetValue, difference];
UIAlertView *alertView = [[UIAlertView alloc]]
initWithTitle:@"Hello, World!"
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];