I have 5 segmented contol segments on navigation bar and the requirement of my app is such that I have to change views in within one segment only. Now I have two UIViews
within one xib. I have set an integer flag and depending on that flag, I need to change the views. I am posting this because both the view will have a table view within one xib and they will have different number of rows, different cellForRowAtIndexPath
and didSelectRowAtIndexPath
. So two questions are - How to select a particular view depending on the flag and How to manage delegate methods of both UIViews as file owner will create issues? If someone suggest to create a separate class with UIViewController, then how to overwrite / replace the view for that particular segment?
Please note that i am not using storyboards. App is based on XIB's only