문제

UialertView가 표시하는 메시지에 인스턴스 변수를 포함하려고합니다.

lostAlert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:(@"You Were Wrong, the correct structure was %@", structureName)  delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];

그러나 경고가 표시되면 메시지가 표시되지 않습니다.

모든 아이디어와 도움을받을 것입니다. :)

도움이 되었습니까?

해결책

당신은 그것을 시도 했습니까 :

[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]

대신에

(@"You Were Wrong, the correct structure was %@", structureName)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top