Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 18, 2008, 10:51 AM   #1
darkpegasus
macrumors newbie
 
Join Date: Jul 2008
UIBarButtonItem Image not showing

I have a UIBarButtonItem that I am trying to create with initWithImage. However, whenever I run the app I get a small button with a blank white box instead of the image. Am I missing something?

UIBarButtonItem *myToolbarItem = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"myImage.png"]
style:UIBarButtonItemStyleBordered
target:self
action:nil] autorelease];
darkpegasus is offline   0 Reply With Quote
Old Jul 18, 2008, 02:11 PM   #2
grimjim
macrumors member
 
Join Date: May 2003
This snippet of the UIBarButtonItem documentation might have some bearing on it:
Quote:
The alpha values in the source image are used to create the images—opaque values are ignored
So, if your image is rectangular and opaque, all you will see is the rectangle. Try using an image with an alpha channel, and you should get better results.
grimjim is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Movies Tab Not Showing Up on Apple Tv 2G polo3400 Apple TV and Home Theater 2 Jul 13, 2011 07:12 AM
One specific image not showing in IE6 or 7 seventeen Web Design and Development 4 Jul 30, 2009 06:27 PM
Mobileme hosted site images not showing up in any browser beyondjordan iCloud and Apple Services 2 Mar 31, 2009 01:55 PM
UITabBarItem image not showing properly amalshah71 iPhone/iPad Programming 5 Mar 9, 2009 10:37 AM
Why does this image not show up in IE? jive Mac Applications and Mac App Store 1 May 16, 2006 04:34 PM


All times are GMT -5. The time now is 11:42 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC