Use of xcassets versus design team - xcode

Design team provide a folder with all the images required for a project.
I've create xcassets for the icon and splash files, and for some images who require slicing, etc
I've notices that all the image in xcassets have been duplicate in the xcassets folder.
My question:
From xcassets, can I link to image, instead of having xcode
duplicate it?
If link not possible, what are the best way to work with design
team?
Do you thing that, at compile time, xcode will insert just one copy
of the image?
Thanks for your infos

The purpose of xcassets is to consolidate all of your project assets into a nice bundle. I tend to split into multiple xcassets for larger projects. After you pop everything to xcassets, you can get rid of other asset instances from your project.
In compile time, only the files selected in the "add to target" field will be copied over.
Just stick all your files into xcassets, don't add them anywhere else.

yes ofcourse there is one tool for your problem's solution
AVXCassets Generator
Hope you will like it

Related

Is it possible to use custom icon for Xcode file template?

In our project we generate multiple swift files when using the file xctemplate configuration. However, with this configuration, there is no icon displayed in Xcode when generating the files (see attached image). We did try to add two images to the template folder: TemplateIcon-png and TemplateIcon#96.png which yielded no success. Is it possible to use a custom icon for file templates in Xcode?
Not sure if you're still looking for an answer to this, but you should be able to create an .icns icon package named TemplateIcon.icns. This should contain your template image(s) to be displayed in the new project picker.
I suspect your issue was trying to use the PNG assets directly.
See the Base Acceptance Testing Bundle for an example. It is part of the OCSlimProjectXcodeTemplates repository.

Visual studio Image folder in sub project

In one of my visual studio projects there are some sub directories each of them containing sub projects. In one such sub-project I have an Image folder containing an image. Now I am not being able to load that image doing something like this.
<img id="loading" src="~/Image/loader.gif" alt="loader">
When I hover on it in my dev tool it shows me the path like
http://localhost:62360/Image/loader
and the image is not found on that location. Any idea what can be done?
For everyone with problems like that
I highly recommend, if its a part of your project that shouldn't be replaced or be replaced, to use a resource file. Here is a small instrction how to do so.
You can now simply choose "~/resource/WhatIsThis.png" as URL (usually in the GUI the url can be choosen via dialog).
As said in documentation, it is important to know that the resource file will store the URL to your image, not the image itself. But that won't make a difference in this case.

Localizable xcassets files?

In previous versions of xcode you could set image files as localizable files and import different image files for different locales.
I cannot seem to do this using the new XCAssets functionality in Xcode 5. Is there a way to do this within the xcassets structure? Or do I have to import the images as separate files.
I've also looked for this, and after some time looking around it seems that is not possible for the moment using the xcassets, although it may change in the future... or not
Apple currently recommends that the launch image should simulate the app first screen but without content.
Apple launch images guidelines
Yes seems not possible with xcassets for now as per Macistador answer.

Delphi - Want an automated way of maintaining the link between a "source" image file and images in my project

One thing I find Delphi doesn't manage well is the link between image "source" files and the image components in my project (D2006 here but I'm assuming it applies to all versions).
Say I have various static images in my project - backgrounds, toolbar button glyphs, various bits of eye candy, etc. I have a corresponding collection of PNG/BMP etc. files that I have sourced, scraped or created, and these have been loaded into the image components at design time.
One problem is that there seems to be no automated way of finding out three months later what source image file was used to load an image component. This becomes more of an issue when you need to edit one or more images.
So what I would really like, is some way of including the image source files in a build of a project. I.e. when I did a build, all of the image components would be reloaded from the sources first. At present, when I modify some of my images with PhotoShop or similar, I'm faced with a lengthy and error-prone process to reload the altered images into their respective image containers.
Is creating a resource with all of the images bound into it and adding code to load the image components at startup a viable way to go? Do others have this problem, and how do you manage it?
None of the standard components support what you are asking for. However, Thany's TPngImageList component does support the ability to associate a user-defined string with each image in the list.
Otherwise, to know which file belongs with which image, I would suggest using an .rc file to compile the external image files into the app's resources at compile-time, and then you can load the image resources into your components dynamically at run-time instead of at design-time. That way, you can manage the image files however you want. When you change a file, it will automatically be linked into the app on the next compile.
You might load the same images in runtime, and add these images in version control to ease maintenance. There are also command line tools for Lazarus (I guess you might find similar for Delphi too) which can put files into resources that you app can later use.
I load the images from ico files, populate a imagelist and then use it in my Virtual string tree for various nodes. Easy to change the ico files.
/Mikael

Using folders to keep images neat and organized

So I'm used to this kind of sorting my source files, but I can't seem to be able to find a solution to this problem in Xpages. It would be great if I can store my images like for example: UI images in "ui", layout images in "layout" and so on... Is this possible? Or maybe some kind of workaround?
Thank you!
In image resources, you can also use "virtual folders" to organize the image files.
E.g.
If you have a header image named "header.png". Rename to "layout\header.png".
When you reference this image from the web browser, the path will be:
http://somedomain.com/path/to/db.nsf/layout/header.png
In Package Explorer (or Eclipse Navigator), locate the WebContent folder. This is treated as the "root" of the NSF when an XPage is accessed. If your images are already stored on your hard drive in the folder structure you want to create, you can literally just drag the top-level folder to WebContent, and it'll preserve the exact same structure. You can also manually add folders to WebContent (or any subfolder) using the context menu.
Use the Eclipse Navigator view (add it to your perspective) - there you should be able to create a folder in the images. What works definitely is to use webDAV for design files

Resources