I have an iOS application where you select an option before you log in开发者_JAVA百科. The way it works is that you click on the button that says "Select", then it takes you to a UITableViewController which shows you the options, you select the option, and it takes you back to the previous menu with the text replaced with your selection (and a hidden ID saved, too).
During the update of the information (which takes place in tableView:didSelectRowAtIndexPath:) I call NSLog on the object. The first time I call it, it returns null (BUT for some reason the text still changes!) and the second time I call it, it works! Why doesn't it work the first time????
Thanks
Do you put the NSLog line before the previous view push back code ?
The variable was named incorrectly. I don't know why XCode didn't just tell me this instead of giving me an EXC_BAD_ACCESS, but that's what happened.
精彩评论