• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: Big memory/time consumption in NSTreeController KVO GC
  • Next by Date: Re: CAShapeLayer and touches?
  • Previous by thread: Re: Additional action when a view's value changes (Cocoa Bindings)
  • Next by thread: Re: UINavigationBar, setTintColor: and UIColor colorWithPatternImage:
  • Index(es):
    • Date
    • Thread