Merge branch 'develop' of https://github.com/CatchChat/Yep into develop

This commit is contained in:
kevinzhow
2015-09-01 16:26:13 +08:00
@@ -12,8 +12,10 @@ class YepTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.whiteColor()
delegate = self
view.backgroundColor = UIColor.whiteColor()
// UITabBarItem image title
// if let items = tabBar.items as? [UITabBarItem] {
@@ -39,3 +41,20 @@ class YepTabBarController: UITabBarController {
}
}
}
extension YepTabBarController: UITabBarControllerDelegate {
func tabBarController(tabBarController: UITabBarController, didSelectViewController viewController: UIViewController) {
if selectedIndex == 1 {
if let nvc = viewController as? UINavigationController, vc = nvc.topViewController as? ContactsViewController {
syncFriendshipsAndDoFurtherAction {
dispatch_async(dispatch_get_main_queue()) { [weak vc] in
vc?.updateContactsTableView()
}
}
}
}
}
}