Let's have an example.
- In application I have a tab bar controller.
- Tab bar has two items dynamically - two view controllers.
- User can select any of tab.
- Suppose user selects first tab.
- First view controller is already loaded.
- Now he clicks on a button of First view controller.
- From First View controller -> Second View controller is pushed.
- Now when user taps on tab bar first item
- second view is popped out.
This is done through by default by tab bar controller. Now, If I want to check following condition
- if(tab bar first item-view controller has first view controller view)
- then perform this
- if(tab bar first item-view controller has second view controller view)
- then perform this
How to implement this logic?