UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
- Subject: UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
- From: Duccio <email@hidden>
- Date: Wed, 09 Dec 2009 15:34:07 +0100
Related to "[iPhone] UINavigationController and UINavigationBar".
-----------------------------------------------------------------
Instantiating a color using colorWithPatternImage:
UIColor *color = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.png"]];
and using it to set the tintColor of a UINavigationBar:
[self.navigationController.navigationBar setTintColor:color];
the navigation bar is all black (with a small light effect on the top, the same as [self.navigationController.navigationBar setTintColor:[UIColor blackColor]]) with no image on it.
Using instead the color to "fill" the view of my view controller works ([self.view setBackgroundColor:color]) so UIColor colorWithPatternImage: is working.
The UIColor documentation says:
> colorWithPatternImage:
>
> You can use pattern colors to set the fill or stroke color just as you would a solid color.
So, why I can't use on my UINavigationBar?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden