- (IBAction)addButtonTouched:(UIButton *)sender
float vei = [vekt.text floatValue];
float huy = [hoyde.text floatValue];
float hoy2 = huy/100;
float ski1 = hoy2 * hoy2;
float ski = vei/ski1;
float skileng1 = 1.45 * ski;
float ski2 = 21 - ski;
float ski3 = 8 * ski2;
float skileng = skileng1 - ski3;
self.BMi.text = [NSString stringWithFormat:@"%f", skileng];
这就是代码,按下按钮时我收到此消息:
2013-06-09 22:41:43.978 BMI[2773:11303] -[UIView text]: unrecognized selector sent to instance 0x8896610
2013-06-09 22:41:43.980 BMI[2773:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView text]: unrecognized selector sent to instance 0x8896610'
*** First throw call stack:
(0x1c92012 0x10cfe7e 0x1d1d4bd 0x1c81bbc 0x1c8194e 0x2358 0x10e3705 0x172c0 0x17258 0xd8021 0xd857f 0xd76e8 0x46cef 0x46f02 0x24d4a 0x16698 0x1beddf9 0x1bedad0 0x1c07bf5 0x1c07962 0x1c38bb6 0x1c37f44 0x1c37e1b 0x1bec7e3 0x1bec668 0x13ffc 0x203d 0x1f65)
libc++abi.dylib: terminate called throwing an exception
有什么帮助吗?