0
我無法在我的警報視圖中顯示一個雙精度值。該字符串在AlertView中始終顯示爲0。提前致謝!將文本框加倍然後顯示爲字符串AlertView
double binRadius = [txtRadiusInches.text doubleValue]/12 + [txtRadiusFeet.text doubleValue];
NSString *myString = [NSString stringWithFormat:@"%d", binRadius];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Estimatated Amount"
message:myString
delegate:self
cancelButtonTitle:@"Continue"
otherButtonTitles:@"Clear All", nil];
[alert show];
謝謝,這解決了這個問題。 – brmcdani44