Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

10. Putting It All Together > Finishing Off and Tidying Up

Finishing Off and Tidying Up

That’s nearly everything, but we need to tie up a few loose ends before we can call the app complete. Well, some of them seem more like “glaring mistakes” than “loose ends,” but we’ll come to that later.

To start with, the QuestionListTableDataSource needs to know which notification center instance to use when the user selects a question in the list, and the BrowseOverflowViewController doesn’t currently tell it. It should, and we can require that with a test on BrowseOverflowViewControllerTests:

- (void)testViewControllerHooksUpQuestionListNotificationCenterInViewDidAppear {
    QuestionListTableDataSource *questionDataSource =
        [[QuestionListTableDataSource alloc] init];
    viewController.dataSource = questionDataSource;
    [viewController viewDidAppear: YES];
    STAssertEqualObjects(questionDataSource.notificationCenter,
        [NSNotificationCenter defaultCenter], @"");
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial