Dynamic top tab bar

I wish to implement tab bar based on API data.
I have done it in static method but i want help to do it in dynamically