2016-10-30 2 views
0

私は5つのアイテムを持つtabbarViewControllerを持っています。 didSelectItem方法:tabbarアイテムをポップビューコントローラのようにするinstagram

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { 
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; 
CreateViewController *dest = [storyBoard instantiateViewControllerWithIdentifier:@"CreateNewRecipe"]; 
if (item.tag == 1) { 
    [self presentViewController:dest animated:YES completion:NULL]; 
} 
私はtabbarControllerクラスで、私は タブバーでUITabbarDelegateを使用するので、(InstagramののテイクImageボタンのような)新しいのViewControllerに第三項目のポップを作りたい enter image description here

しかし、私が提示したビューコントローラでは、dismissViewControllerAnimated:完了:(ボタンアクションで)戻るには、"NaviOfCreateViewController"に戻ります。 :

enter image description here

私はちょうど私が第三TabBarの項目をクリックする前にすることをTabbarControllerに引き返すいたいです。私を助けるどんな解決策ですか?ありがとうございました。

答えて

0

私は私の問題をうんざりしました。私はUITabbarアウトレットをView Controllerに使用し、自分でカスタマイズします。 そしてもちろん使用していますUITabbarDelegatetabBar:didSelectItemメソッド

関連する問題