Re: Loading image resources
Re: Loading image resources
- Subject: Re: Loading image resources
- From: Quincey Morris <email@hidden>
- Date: Sat, 13 Sep 2014 21:12:51 +0000
On Sep 13, 2014, at 12:28 , Charles Jenkins <email@hidden> wrote:
> After calling bundle.pathForResource:ofType:, imageName is nil. I think what I’m doing is what the Resource Programming Guide says to do. How am I getting it wrong?
a. Yes, but did you check whether bundle or imageFileName is nil? Is imageFileName the correct path to where the files actually are?
b. No one should be using path-based API any more, generally. You should use URL-based equivalents.
c. IAC, there’s an easier way. For example:
folderImage = NSImage.imageNamed (@“Folder”);
No mucking about with paths or URLs!
_______________________________________________
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