                         self.emptyNotificationsView.hidden = false
                     }
                     dispatch_async(dispatch_get_main_queue()) {
+                        self.refreshingData = false
+                        println("################################################## FALSE")
                         MBProgressHUD.hideHUDForView(self.view, animated: true)
                         println("Counter = \(--self.hudCounter)")
                         self.tableView.reloadData()

        refreshControl = UIRefreshControl()
        refreshControl.addTarget(self, action: "refreshData", forControlEvents: UIControlEvents.ValueChanged)
        tableView.addSubview(refreshControl)
        refreshData()
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(true)
        segmentedControl.selectedSegmentIndex = 0
        segmentedControlValueChanged(segmentedControl)
    }
    
    override func viewDidAppear(animated: Bool) {

            }
            dispatch_async(dispatch_get_main_queue()) {
                self.refreshControl.endRefreshing()
                self.refreshingData = false
            }
        }
    }
