I am attempting to modify the location of the Icons in each UITabBarButton so that it is centered top-to-bottom (this is UITabBarSwappableImageView). I am also attempting to get rid of the text in each UITabBarButton (this is just a plain vanilla UILabel).
Simply walking the hierarchy and setting the transform or frame of each UITabBarSwappableImageView does not work, as UITabBarController comes in behind me and sets its own values in there, of course.
If I walk the view hierarchy in my window, the following views are underneath it:
(note that TransitionView is my class for transitioning between view controllers, and UILayoutContainerView is the actual top level View behind UITabBarController)
Code:
-- Begin Window #0 ---
-- Begin <TransitionView: 0x125210> --
-- Begin <UILayoutContainerView: 0x1459c0> --
-- Begin <UITabBar: 0x1462b0> --
-- End <UITabBar: 0x1462b0> --
-- Begin <UITransitionView: 0x144100> --
-- Begin <UIView: 0x14a2b0> --
-- Begin <UIImageView: 0x14a5c0> --
-- End <UIImageView: 0x14a5c0> --
-- Begin <UIRoundedRectButton: 0x14a720> --
-- Begin <UIImageView: 0x3605260> --
-- End <UIImageView: 0x3605260> --
-- Begin <UIImageView: 0x3605450> --
-- End <UIImageView: 0x3605450> --
-- Begin <UILabel: 0x36054b0> --
-- End <UILabel: 0x36054b0> --
-- End <UIRoundedRectButton: 0x14a720> --
-- End <UIView: 0x14a2b0> --
-- End <UITransitionView: 0x144100> --
-- Begin <UITabBar: 0x13fc30> --
-- Begin <UITabBarButton: 0x140ca0> --
-- Begin <UITabBarSwappableImageView: 0x1290d0> --
-- End <UITabBarSwappableImageView: 0x1290d0> --
-- Begin <UILabel: 0x142470> --
-- End <UILabel: 0x142470> --
-- End <UITabBarButton: 0x140ca0> --
-- Begin <UITabBarButton: 0x141900> --
-- Begin <UITabBarSwappableImageView: 0x1416c0> --
-- End <UITabBarSwappableImageView: 0x1416c0> --
-- Begin <UILabel: 0x143020> --
-- End <UILabel: 0x143020> --
-- End <UITabBarButton: 0x141900> --
-- Begin <UITabBarButton: 0x1426d0> --
-- Begin <UITabBarSwappableImageView: 0x143c00> --
-- End <UITabBarSwappableImageView: 0x143c00> --
-- Begin <UILabel: 0x1439c0> --
-- End <UILabel: 0x1439c0> --
-- End <UITabBarButton: 0x1426d0> --
-- Begin <UITabBarButton: 0x144530> --
-- Begin <UITabBarSwappableImageView: 0x143390> --
-- End <UITabBarSwappableImageView: 0x143390> --
-- Begin <UILabel: 0x144330> --
-- End <UILabel: 0x144330> --
-- End <UITabBarButton: 0x144530> --
-- Begin <UITabBarButton: 0x143e20> --
-- Begin <UITabBarSelectionIndicatorView: 0x1f0670> --
-- End <UITabBarSelectionIndicatorView: 0x1f0670> --
-- Begin <UITabBarSwappableImageView: 0x144760> --
-- End <UITabBarSwappableImageView: 0x144760> --
-- Begin <UILabel: 0x144c50> --
-- End <UILabel: 0x144c50> --
-- End <UITabBarButton: 0x143e20> --
-- End <UITabBar: 0x13fc30> --
-- End <UILayoutContainerView: 0x1459c0> --
-- End <TransitionView: 0x125210> --
-- End Window #0 ---
Does anyone know how to get a callback (perhaps via KVO?) once the layout of subcomponents performed by UITabBarController is completed?