//如果沒有navigationController的情況,換到第五頁
[(UITabBarController*)self.tabBarController setSelectedIndex:4];
//如果有navigationController的情況,換到第五頁
[(UITabBarController*)self.navigationController.tabBarController setSelectedIndex:4];
用self.navigationController取得當前view controller的navigationController
用self.tabBarController取得當前view controller的tabBarController