UITextField
我试图在我的,中输入大于 200 的值时显示警报rcdAtIan.text
。我试过这个:
Self.rcdAtIan.text = self.circuit.rcdAtIan;
if (_rcdAtIan.text > @"200");{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Value Exceeded" message:@"Message here............." delegate:nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[alert show];
然后这个:
Self.rcdAtIan.text = self.circuit.rcdAtIan;
if (self.circuit.rcdAtIan > @"200");{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Value Exceeded" message:@"Message here.........." delegate:nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[alert show];
}
但是在加载视图时会显示警报,而不是通过我的if
声明。我知道我想说什么if (_rcdAtIan.text => 200 "show my alert");
——但我不确定语法是否正确。