if userData != nil {
self.initUserInfo()
self.retreiveOrderCount()
self.retreiveWatchCount()
self.retreiveFollowingCount()
} else {
UIApplication.sharedApplication().networkActivityIndicatorVisible = false
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewControllerWithIdentifier("loginview")
self.presentViewController(controller, animated: true, completion: nil)
}
}
这是给我预期声明的代码块。
答案 0 :(得分:0)
最后还有一个额外的支架。如下图所示取下支架:
if userData != nil {
self.initUserInfo()
self.retreiveOrderCount()
self.retreiveWatchCount()
self.retreiveFollowingCount()
} else {
UIApplication.sharedApplication().networkActivityIndicatorVisible = false
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewControllerWithIdentifier("loginview")
self.presentViewController(controller, animated: true, completion: nil)
}