Petar
Petar

Reputation: 2283

iOS: UISegmentedControl VS UITabBarController

What are the best practices of using these controls ? The documentation is not very clear about when should these be used. They seem to be doing the same thing but in different ways. When should one use UISegmentedControl and when UITabBarController ?

Upvotes: 0

Views: 550

Answers (2)

Shahrukh Malik
Shahrukh Malik

Reputation: 252

UISegmentedControl is used in a single view controller to manipulate different views. It is usually used to reload table view from different data sources based on each segment.

UITabBarController holds multiple view controllers which are loaded and user can switch between them by tapping on the tab.

Upvotes: 2

Mr Rogers
Mr Rogers

Reputation: 6251

I think of it this way: UISegmentedControl is for multiple options with a single view controller. UITabBarController is for navigating between multiple view controllers.

Upvotes: 4

Related Questions