开发者

How do I texture controls on iPhone Apps?

开发者 https://www.devze.com 2023-02-27 03:27 出处:网络
I would like to apply a texture to my iPhone app similar to the tab bar in GameCenter.app. Is there a good tutorial somew开发者_Go百科here that explains this? I am hoping for a method that will transl

I would like to apply a texture to my iPhone app similar to the tab bar in GameCenter.app. Is there a good tutorial somew开发者_Go百科here that explains this? I am hoping for a method that will translate easily to other controls as well. Thanks!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消