Carl Mangold

Flash & iPhone coding & concepting
  • Home
  • Bright.app
  • Commentaar
  • iPhone
  • Nieuws
  • Obj-C tips
5 Okt 2009

Tip: UINavigationBar met achtergrondafbeelding

Als je de navigatiebalk bovenin je app wilt ‘branden’ met een eigen achtergrond, kun je dat ‘t handigst met een categorie-extensie op de UINavigationBar doen:

UINavigationBar BackgroundImage
  1. // UINavigationBarBackgroundImage.h
  2.  
  3. @interface UINavigationBar (BackgroundImage)
  4. @end
  5.  
  6. // UINavigationBarBackgroundImage.m
  7.  
  8. #import "UINavigationBarBackgroundImage.h"
  9.  
  10. @implementation UINavigationBar (BackgroundImage)
  11.  
  12. - (void)drawRect:(CGRect)rect
  13. {
  14. [[UIImage imageNamed:@"navBarBackground.png"] drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
  15. }
  16.  
  17. @end

Tags: iPhone, obj-c tip

This entry was posted on maandag, oktober 5th, 2009 at 09:08 by Carl Mangold and is filed under Obj-C tips, iPhone. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Klik hier om het antwoord te annuleren.

« Met Layar moet je niet zoeken
Tip: Google Analytics in je iPhone app »
  • RSS

    • Alle berichten
    • Alle reacties
  • Archieven

  • Kalender

    • oktober 2009
      M D W D V Z Z
      « Sep   Nov »
       1234
      567891011
      12131415161718
      19202122232425
      2627282930  
  • CategoriĆ«n

    • Bright.app (4)
    • Commentaar (43)
    • iPhone (22)
    • Nieuws (2)
    • Obj-C tips (4)