target-action

Disable action - user taps on tabbar item to go to root view controller

a 夏天 提交于 2019-11-27 22:05:02
问题 I want to disable the default action when user taps the tabbar item. For example, i have a tabbar with Tab1, Tab2 and Tab3. In Tab1, user can navigate from View1 to View3 (View1 > View2 > View3). If user is at View3, and he taps the Tab1, the application takes the user to View1 (the root view controller). I want to disable this functionality. I don't want the tap on Tab1 to pop all the view controllers. How can i do that? Edit: This behavior is a little strange, but a handy shortcut in case