Possibly, the file names are wrong.  the iphone is case SenSitIvE.

And also, 'cos Xamarin have said it better than I can:

http://docs.xamarin.com/ios/tutorials/Working_with_Images

The following list summarizes the differences between FromBundle and FromFile:
FromFile is asynchronous; whereas FromBundle is synchronous.
FromFile lazy-loads images.
FromFile can load images from an external location; whereas FromBundle
can only load images that you include with your application.
FromFile provides no built-in caching; whereas FromBundle
automatically caches an image after it is loaded.
Guidance on Using FromBundle vs. FromFile
Generally, you should use UIImage.FromFile when loading several images
at one time, since it lazy-loads images asynchronously. You’ll want to
use UIImage.FromBundle only when loading the same image repeatedly.

(at the very bottom of the page)



On Sat, Jun 23, 2012 at 11:29 PM, Chris_M <[email protected]> wrote:
>
> Well, I'm glad I did it right, but bummed it's not displaying my images. :-)
>
> Looking at the TweetStation example, I notice he's using UIImage.FromBundle.
> What's the difference between that and UIImage.FromFile?
>
> My image files are definitely set to Build Action -> Content.
>
> I tried UIBarButtonSystemItem.Refresh as you suggested, and the refresh icon
> displays correctly. So why the heck aren't *my* images displaying correctly?
>
>
> --Chris
>
>
>
> Nic Wise wrote
>>
>> Looks like you are doing it right. Have a look here too
>>
>> https://github.com/migueldeicaza/TweetStation/blob/master/TweetStation/UI/Web.cs
>>
>> however, are those images set as content in MD? (right click -> Build
>> Action -> Content). If they dont exist in the bundle, then they will
>> never show. Maybe try it with one of the system defined ones and see
>> if that works, eg:
>>
>> new UIBarButtonItem(UIBarButtonSystemItem.Refresh, delegate {
>>
>> ??
>>
>> On Fri, Jun 22, 2012 at 7:03 PM, Chris_M <kungfuchris99@> wrote:
>>>
>>>  The
>>> problem is that I want to use images for the buttons, and the images are
>>> not
>>> displaying (I can get them to display as custom UIBottons but not as
>>> UIBarButtons).
>>>
>>> What am I doing wrong? How do I get the UIImage.FromFile thing to work
>>> with
>>> these UIBarButtonItems?
>>>
>>> My second question is about positioning buttons on the toolbar. Are there
>>> any options other than using the Flexible and Fixed Space bar button
>>> items?
>>>
>>>
>>> --Chris
>>
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/UIToolBar-Button-Question-tp4655537p4655545.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to