Iñigo Beitia
Iñigo Beitia

Reputation: 6353

Accessing UITabBarController's content view

Is there a way to access the content view (shown as Custom content on the diagram) in order to change its frame?

UITabBarController diagram

Upvotes: 3

Views: 2158

Answers (1)

beryllium
beryllium

Reputation: 29767

Access to selected view controller's view in tab bar

UIView *view = tabBarController.selectedViewController.view;

Access to second view controller's view in tab bar

UIView *view2 = [(UIViewController*)[tabBarController.viewControllers objectAtIndex:1] view];

Upvotes: 5

Related Questions