What is the best way to create tabbed application if number of tabbed changes dynamically in app?

I want to create a tabbed application in which number of tab changes depending on whether user is logged in or not. What will be the better solution either create separate storyboard for both cases or create tabs programmatically? Please suggest me.

Answers

I don't think there's a "best practice" here. If you prefer working with storyboards, you can go with that. If you prefer UI via code, then do that.

You could also create everything in the storyboard and then just remove the tabs/ view controllers in case the user is not logged in. Or vice versa: use a storyboard approach and just add the controllers for the "not logged in" case and add the remaining ones programmatically.

@rene_ruppert Let suppose I have created storyboard for 5 tabs and each one has controller associated with them. When user logout I need to show 3 tabs. Can you please show me an example how to remove controllers created in storyboard using code?