i am trying to push view controller into navigation controller. The code seems right in xcode 6.1. But when i changed the project into xcode beta6.3 i was asked by xcode to change the typecase operator as to as!. Now i am not able to push view controller into navigation controller
//delegate method
func sendIndex(row : Int){
switch row {
case 0:
if(!isCurrentMoneyVc){
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let moneySummaryVC: MoneySummaryVC = storyboard.instantiateViewControllerWithIdentifier("moneyVC") as MoneySummaryVC
//self.navigationController?.pushViewController(moneySummaryVC, animated: true)
self.navigationController?.setViewControllers([moneySummaryVC], animated: true)
}else{
hideMenu()
}
case 1:
if(!isCurrentAboutVc){
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let moneySummaryVC1: AccountsVC = storyboard.instantiateViewControllerWithIdentifier("account") as AccountsVC
self.navigationController?.pushViewController(moneySummaryVC1, animated: true)
}else{
hideMenu()
}
case 2:
if(!isCurrentTransactionVc){
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let moneySummaryVC2: Transaction = storyboard.instantiateViewControllerWithIdentifier("transact") as Transaction
self.navigationController?.pushViewController(moneySummaryVC2, animated: true)
}else{
hideMenu()
}
default:
println("no index")
}
}