、に200を超える値が入力されたときに、アラートを表示しようとしていUITextField
ます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");
—しかし、正しい構文がわかりません。