-1
uialert보기에 이중 값을 표시하기 만하면됩니까?objective-c : iphone 프로그래밍 : UIAlert보기에서 변수 표시하기
uialert보기에 이중 값을 표시하기 만하면됩니까?objective-c : iphone 프로그래밍 : UIAlert보기에서 변수 표시하기
지금 UIAlertView
을 어떻게 표시하고 있습니까?
double myDouble = 12.6;
NSString *alertString = [NSString stringWithFormat:@"%g", myDouble];
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:alertString
message:nil
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:nil];
[myAlert show];
가 포맷 NSString
에 값을 넣고 alertView에 그를 보내 : 다음과 같은 뭔가 작업을해야
NSString *messageString = [NSString stringWithFormat:"@number = %.2f", 42.0];
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Title text" message:messageString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];