November 2011
Beginner
238 pages
6h 19m
English
In the section, “Posting a Score,” earlier in this chapter, we discovered how to post new scores to Game Center. Our methodology, while simple, was not the best approach from a user-interaction standpoint. It is now time to refactor the posting new score code to improve usability. This approach is more complex, but delivers better performance and has less of an impact on the user.
The first thing we need to do is move our scoreReported method from UFOGameViewController to UFOViewController. We also want to modify the exit action in the UFOViewController. Modify that method to match the following.
-(IBAction)exitAction:(id)sender;
{
[[self navigationController] popViewControllerAnimated: YES]; [self.gcManager ...