You could create a UIImage
from a UIView
and then use that image to create your tabbar item.
Here's how I'd do it.
First, create the UIImage
(assuming you already have the UIView
):
// Remember to import Quartz!
UIView *view = INITIALIZE_YOUR_VIEW;
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Then you can use the image to create the tabbar item:
UITabBarItem *tabItem = [[UITabBarItem alloc] initWithTitle:@"Title" image:image tag:1010];
And that's it.
Hope this helps!