do not set selectedIndex; code order

This commit is contained in:
nixzhu
2015-11-09 15:07:49 +08:00
parent 39e89a992c
commit 83ecae3f08
+4 -14
View File
@@ -316,22 +316,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
println("matchSharedFeed: \(feed)")
guard let tabBarVC = self?.window?.rootViewController as? YepTabBarController else {
return
}
tabBarVC.selectedIndex = 0
guard let nvc = tabBarVC.selectedViewController as? YepNavigationController else {
return
}
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("ConversationViewController") as! ConversationViewController
guard let
tabBarVC = self?.window?.rootViewController as? UITabBarController,
nvc = tabBarVC.selectedViewController as? UINavigationController,
vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("ConversationViewController") as? ConversationViewController,
realm = try? Realm(),
feedConversation = vc.prepareConversationForFeed(feed, inRealm: realm) else {
feedConversation = vc.prepareConversationForFeed(feed, inRealm: realm)else {
return
}