     super.viewDidLoad()
 
     self.tableView.dataSource = self.dataSource
-
-    self.refreshControl = UIRefreshControl()
-    self.refreshControl!.addTarget(self, action: "tableViewPulledToRefresh:", forControlEvents: .ValueChanged)
-  }
-
-  func tableViewPulledToRefresh(refreshControl: UIRefreshControl) {
-    self.refreshTimer?.invalidate()
-
-    // Simulating data loading, 10 secs to be sure that there's enough time to Reveal the view before it ends
-    self.refreshTimer = NSTimer.scheduledTimerWithTimeInterval(10, target: self, selector: "didLoadDummyData:", userInfo: nil, repeats: false)
-  }
-
-  func didLoadDummyData(timer: NSTimer) {
-    self.refreshControl?.endRefreshing()
+    
+    self.setupRefreshControl()
   }
 
   private static func footerLabelWithText(text: String?) -> UILabel {


private extension CountriesViewController {
  static func configureCell(cell: BasicCell, object: Country) {
    cell.titleLabel.text = object.name
    cell.subtitleLabel.text = object.capital
  }

 //
//  Copyright © 2015 Itty Bitty Apps. All rights reserved.

import UIKit

final class CountriesViewController: RevertTableViewController, CountriesViewRefreshControlProtocol {
  private let collection = CollectableCollection<Country>(items: .CountriesCapitals)
  private let dataSource: DataSource<Country, BasicCell>
  private var refreshTimer: NSTimer?
