Add delegate to data source and view controller.