         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
+        }
+    }
 }


        detailsView = UIView(frame: screen)
        detailsView!.backgroundColor = UIColor.whiteColor()
        detailsView!.addSubview(descriptionLabel!)

        webView = UIWebView(frame:
            CGRect(
                x: 0,
                y: 20 + 44,
                width: CGRectGetWidth(screen),
                height: CGRectGetHeight(screen) - (20 + 44)
            )
        )

        // self.view.addSubview(detailsView!)
        self.view.addSubview(webView!)
        self.mainTableView.hidden = true
    }

    override func viewWillAppear(animated: Bool) {


import UIKit

class RepositoryDetailsViewController: GitHubBrowserTableViewController,
    UITabBarDelegate {
    var descriptionLabel: UILabel?
    var detailsView: UIView?
    var repository: GitHubRepository
    var webView: UIWebView?
    var tabBar: UITabBar?

    init(repository repo: GitHubRepository) {
        repository = repo
