if(self.txtBookID.text.length==BOOK_ID_LENGTH){//string is proper length
if([self.txtBookID.textrangeOfCharacterFromSet:notDigits].location==NSNotFound){//string is numeric
// SEND BOOK ID TO RTI
...
...
@@ -269,7 +264,12 @@ static int BOOK_ID_LENGTH = 14;
// //red x
// [self changeXImage];
// }
NSLog(@"ID accepted");
self.view.backgroundColor=[UIColorgreenColor];
[UIViewanimateWithDuration:1.0animations:^{
self.view.backgroundColor=[UIColorwhiteColor];
}];
[self.txtBookIDsetText:@""];
}else{
UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"Invalid Book ID"message:@"Book ID must be numeric"delegate:nilcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
...
...
@@ -282,11 +282,39 @@ static int BOOK_ID_LENGTH = 14;