Objective-C compiler error -
need [currentvalue, targetvalue, difference]; line. says initializer element not compile-time element. please post solution.
nsstring *message = [nsstring stringwithformat: @"the value of 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];
should be:
nsstring *message = [nsstring stringwithformat: @"the value of slider is: %d\nthe target value is: %d\nthedifference is: %d", currentvalue, targetvalue, difference]; uialertview *alertview = [[uialertview alloc] initwithtitle:@"hello, world!" message:message delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil];
you have '[' before current , and ']' after uialertview alloc.
Comments
Post a Comment