Is it possible to have the same background between tabs on a UITabBarController without having to set the same background on all the views? I want to put a view in the background that periodically does a very short, non-resource intensive animation. When switching tabs, I'd like that animation to persist. I've read how to do it for UINavigationControllers, but haven't found any tips for a UITabBarController.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
Create a Main View Controller which will have the background then from this controller add other views with transparent background, you could also put your background in your application window.
thierry
I've created a UITabBarController Additions category that allows you to do this. Keep in mind that the selected UIViewController will need to be transparent for you to see the background image.
//UITabBarController+CCAdditions.h
//UITabBarController+CCAdditions.m
//example use in an apdelegate
I use colorWithPatternImage instead of backgroundImage because it allows tiling when necessary