I am going through the iphone book by Mark and LaMarche, and cannot understand one segment of code. It involves the following...
Here is what I don't understand. It looks like you are creating a tag for the text field in the first statement. The second statement generates a key and value, using the number (tag) as the key. "tempValues" is an NSDictionary. I don't understand how the number is generated in the first statement, what that number is, etc. This code is in chapter 9 of the Mark book.
Any help or reference is appreciated.
Adam
Code:
NSNumber*tagAsNumber=[[NSNumber alloc]initWithInt:textFieldBeingEdited.tag];
[tempValues setObject:textFieldBeingEdited.text forKey:tagAsNumber];
Here is what I don't understand. It looks like you are creating a tag for the text field in the first statement. The second statement generates a key and value, using the number (tag) as the key. "tempValues" is an NSDictionary. I don't understand how the number is generated in the first statement, what that number is, etc. This code is in chapter 9 of the Mark book.
Any help or reference is appreciated.
Adam