Well, that explanation was helpful. I learned how to verify that the
images.xcassets is indeed included in my target build. Also I tried one of your
suggestions, and this is what works:
class func getImageAsset( name: String ) -> NSImage {
let bundle = NSBundle.mainBundle()
let img =
Performance is another reason. IIRC, in earlier OS X releases it turned out
that there was significant overhead stemming from converting between different
types of file references as a call went up and down the stack —
NSString/CFString <—>NSURL/CFURL <—> FSRef <—> C strings, etc. (This may soun
On Sep 14, 2014, at 11:37 , Charles Jenkins wrote:
> Okay, here’s a point on which I may need education. Xcode created my project
> with an images.xcassets folder right there in it, and that’s where I’m adding
> my images. Do you mean that’s not enough? I need to add images.xcassets to
> the t
Okay, here’s a point on which I may need education. Xcode created my project
with an images.xcassets folder right there in it, and that’s where I’m adding
my images. Do you mean that’s not enough? I need to add images.xcassets to the
target somewhere else? How do I do that?
--
Charles Jen
On Sep 14, 2014, at 2:57 AM, Aandi Inston wrote:
>> No one should be using path-based API any more, generally.
>> You should use URL-based equivalents.
>
> Why? Really, why? Certainly there are APIs where we have to use URL's and
> we have to convert the path into a URL, but where a non-deprecat
Le 14 sept. 2014 à 10:23, Quincey Morris
a écrit :
> On Sep 14, 2014, at 00:57 , Aandi Inston wrote:
>
>> Why? Really, why? Certainly there are APIs where we have to use URL's and
>> we have to convert the path into a URL, but where a non-deprecated
>> path-based URL exists, what current or f
On Sep 14, 2014, at 00:57 , Aandi Inston wrote:
> Why? Really, why? Certainly there are APIs where we have to use URL's and
> we have to convert the path into a URL, but where a non-deprecated
> path-based URL exists, what current or future obstacles do you foresee? The
> URL doesn't seem to be m
> No one should be using path-based API any more, generally.
> You should use URL-based equivalents.
Why? Really, why? Certainly there are APIs where we have to use URL's and
we have to convert the path into a URL, but where a non-deprecated
path-based URL exists, what current or future obstacles
On Sep 13, 2014, at 21:33 , Charles Jenkins wrote:
> Of course I meant that the imageFileName returned by the API call is nil.
Ah, OK, but you still need to verify that everything is in place. For example,
if you forgot to add the asset folder to the target, the image files wouldn’t
be in th
*Sigh* I seem to make a typo every time I post to this list. Of course I meant
that the imageFileName returned by the API call is nil.
--
Charles Jenkins
On Saturday, September 13, 2014 at 5:12 PM, Quincey Morris wrote:
> On Sep 13, 2014, at 12:28 , Charles Jenkins (mailto:cejw...@gmail
On Sep 13, 2014, at 12:28 , Charles Jenkins 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
im
Hi, everyone.
In my project’s images.xcassets, I created three image sets with these names:
Folder
SinglePage
MultiPage
Each one contains a single PNG image. Now I’m trying to load them into NSImages.
Here’s what doesn’t work:
let folderImage: NSImage
let singleDocumentImage: NSImage
l
12 matches
Mail list logo