 
         detailsView = UIView(frame: screen)
         detailsView!.backgroundColor = UIColor.whiteColor()
-        detailsView!.addSubview(descriptionLabel!)
+        // detailsView!.addSubview(descriptionLabel!)
 
         webView = UIWebView(frame:
             CGRect(
                 x: 0,
                 y: 20 + 44,
                 width: CGRectGetWidth(screen),
-                height: CGRectGetHeight(screen) - (20 + 44)
+                height: CGRectGetHeight(screen) - (20 + 44 + 48)
             )
         )
+        self.detailsView!.addSubview(webView!)
 
-        // self.view.addSubview(detailsView!)
-        self.view.addSubview(webView!)
+        let tab1 = UITabBarItem(title: "Readme", image: nil, tag: 0)
+        let tab2 = UITabBarItem(title: "Files", image: nil, tag: 1)
+        tabBar = UITabBar(frame:
+            CGRect(
+                x: 0,
+                y: CGRectGetHeight(screen) - 48,
+                width: CGRectGetWidth(screen),
+                height: 48
+            )
+        )
+        tabBar!.items = [tab1, tab2]
+        tabBar!.selectedItem = tab1
+        tabBar!.delegate = self
+
+        self.view.addSubview(detailsView!)
         self.mainTableView.hidden = true
+
+        self.view.addSubview(tabBar!)
     }
 
     override func viewWillAppear(animated: Bool) {


import UIKit

class RepositoryDetailsViewController: GitHubBrowserTableViewController {
    var descriptionLabel: UILabel?
    var detailsView: UIView?
    var repository: GitHubRepository
    var webView: UIWebView?

    init(repository repo: GitHubRepository) {
        repository = repo

        let request = NSURLRequest(URL: url)
        webView!.loadRequest(request)
    }

    func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem!) {
        if item.tag == 0 {
            self.detailsView!.hidden  = false
            self.mainTableView.hidden = true
        } else if item.tag == 1 {
            self.detailsView!.hidden  = true
            self.mainTableView.hidden = false
        }
    }
}
