Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between UITabBar and UITabBarController?

What is the difference between UITabBar and UITabBarController? When is it more beneficial to use one over the other?

like image 894
Sheehan Alam Avatar asked Jun 04 '10 02:06

Sheehan Alam


1 Answers

A view is an object that knows how to display data to a user and accept user input. A controller is an object that knows what data to display to a user and what to do with user input. A UITabBar is a UIView is a view. It knows how to display a list of tabs to the user, and how to display feedback to the user when the user interacts with the tabs. A UITabBarController is a UIViewController is a controller. It knows what tabs to display to the user, and what to do when the user chooses a tab.

If you have written your own controller object, you can hook a UITabBar up to your controller. If you have not, then a UITabBarController is a convenient base class from which you can derive your controller.

like image 97
drawnonward Avatar answered Oct 02 '22 23:10

drawnonward