I would like to apply a texture to my iPhone app similar to the tab bar in GameCenter.app. Is there a good tutorial somewhere that explains this? I am hoping for a method that will translate easily to other controls as well. Thanks!
Asked
Active
Viewed 431 times
0
-
It really depends on the control - Apple implements their drawing and layout differently. – BoltClock Apr 20 '11 at 16:45
-
Particularly I'm interested in Buttons, TabBars, and ListView's. – Weston Apr 20 '11 at 16:47
-
See: http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar – magma Apr 20 '11 at 17:29
1 Answers
1
A simple way to add texture for backgrounds is to use the built in colorWithPatternImage.
UIImage *image = [UIImage imageNamed:@"backgroundPattern"];
[self setBackgroundColor:[UIColor colorWithPatternImage:image]];
If you have a toolbar you should be able to use your "Patternized UIView" with UIBarButtonItem, one of its initializers take a UIView.

Konrad77
- 2,515
- 1
- 19
- 36
-
Thanks it worked btw i also found out how to do it with navbars http://foobarpig.com/iphone/uinavigationbar-with-solid-color-or-image-background.html – Weston Apr 21 '11 at 00:58