Search code examples
uitabbarcontrollerios7uitabbar

How to resize UITabBarController content view in iOS7?


Has anyone been able to resize the content view for an iOS 7 UITabBarController? In previous versions it consisted of two views. A UITabBar and a UITransitionView. The transition view was the content view. However as of iOS 7 SDK the UITransitionView is fullscreen and setting its size does nothing.

I need to resize the content view as I want to display an ad above the UITabBar.


Solution

  • I managed to reach the actual content view on iOS 7 (inside the UIViewControllerWrapper) via this

    UIView *viewToResize = [[transitionView.subviews[0] subviews] objectAtIndex:0];
    

    WHen you then resize that view, you should obtain the same effect as resizing the UITransitionView.