Questions tagged [xcasset]

An image asset catalog is an asset management file type and editor in Xcode 5.

Xcode 5 asset catalogs manage images and icons in multiple resolutions. An asset catalog is a new asset management file type and editor in Xcode 5.

You use asset catalogs to store and manage images for different platforms, devices, and scale factors. The catalog presents the image variants required, and provides you with the ability to define slice and stretch points for images that are resized at runtime.

For more information on Xcode Asset Catalogs, refer here.

235 questions
7
votes
0 answers

Xcode 10 asset catalog Preserve Vector Data not working

My app uses PDF vector assets. Found asset get pixelated scaling in my UIImageView when building my app in Xcode 10 (targetting iOS 11) but when I build same exact app in Xcode 9.4 I do not see this issue and image looks sharp. Any ideas for fix in…
Vlad
  • 5,727
  • 3
  • 38
  • 59
7
votes
1 answer

Xcode 7, asset catalog universal device background image support?

I've seen various old posts regarding image sizes, but I can't find anything up-to-date or even know if it's possible with just asset catalog to provide images for all iPad and iPhone screen sizes.? This is the best post I've found, but in Xcode 7…
Jules
  • 7,568
  • 14
  • 102
  • 186
7
votes
1 answer

The folder “Icons.xcassets” doesn’t exist when opening xCode project

I have a project that has a number of targets and now I am getting the error The folder “Icons.xcassets” doesn’t exist. in two popups when I open the project or move around targets. What would be causing this?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
7
votes
4 answers

Can I access an xcassets directory on the filesystem?

I would like to dynamically load all images in an xcassets directory. The files are named StockPhoto# where # is the number in the list. If I can access my StockPhotos.xcassets at runtime to count all the files in the directory, I won't have to…
user
  • 3,388
  • 7
  • 33
  • 67
7
votes
1 answer

Path Parameter in UIImage imageWithContentsOfFile: for XCAsset

Is there any way to retrieve a UIImage object with imageWithContentsOfFile: if the image is stored in an xcasset Bundle (Xcode 5 Image Catalog)? It's easy to access it with the imageNamed: method, but imageWithContentsOfFile: has a slightly…
Sam Spencer
  • 8,492
  • 12
  • 76
  • 133
7
votes
3 answers

storyboard has question marks for every image after I imported into xcassets

all images in my storyboard are now ? images. This happened after I imported all media assets into a new .xcassets structure. The app runs fine and the images show when the app runs, but what can I do to restore them in the storyboard?
Mark W
  • 3,879
  • 2
  • 37
  • 53
6
votes
1 answer

What does Auto Scaling do in Xcode 10 xcasset image properties

Found new option on xcasset catalogue image property in Xcode 10 called "Auto Scaling". What does this property do? Is it in any way related to Resizing: "Preserve Vector Data" when using PDF vector assets?
Vlad
  • 5,727
  • 3
  • 38
  • 59
6
votes
3 answers

How can I load an image from Assets.car (compiled version of xcassets) within an NSBundle? (without using CocoaPods)

We're getting these kind of error messages: Could not load the "iconStatus" image referenced from a nib in the bundle with identifier "com.company.OurResourceBundle". Basically, we put a bunch of images in the xcassets folder ( which works for…
Tom Fishman
  • 1,716
  • 6
  • 22
  • 36
6
votes
2 answers

Assets.car is 6 times larger than actual Images.xcassets folder when archived

We switched our XCode project over to use the Asset Catalog during a redesign. We needed several large background images, which we included in the asset catalog. The images were originally JPEGs that we renamed to PNGs to save space. The size of…
CWitty
  • 4,488
  • 3
  • 23
  • 40
6
votes
2 answers

Getting launch image from xcassets file has wrong size

Xcode's default Images.xcassets file has a slot for LaunchImage, where for a portrait iPhone app there are 5 possible slots. According to the documentation, to get an image properly sized from the xcassets file, just use [UIImage…
Snowman
  • 31,411
  • 46
  • 180
  • 303
6
votes
1 answer

Using xcassets images as src for img tag in a UIWebView web page

Xcode 5 introduced the possibility to manage all your images in a single assets file, instead of having a bunch of png variants hanging around. It works great with IB and Cocoa code, but when I try to reference the pictures from an embedded html,…
KPM
  • 10,558
  • 3
  • 45
  • 66
5
votes
1 answer

Does Both Referencing an Asset Catalogue and Including it from a Framework Create Duplication?

As discussed here & here, the only apparent way to host re-usable images in a Framework's .xcassets file, then use those images in the storyboard / XIB of an app, is to manually create a reference to that catalog file directly within the app's…
TheNeil
  • 3,321
  • 2
  • 27
  • 52
5
votes
2 answers

Can't programmatically change color set in storyboard as color from xcassets catalog

When I set color of some property in Storyboard (for example textColor of my UILabel) as color created as New Color Set in xcassets catalog then I can't programmatically change this color on the first attempt: label.textColor = UIColor(named:…
Robert Dresler
  • 10,580
  • 2
  • 22
  • 40
5
votes
4 answers

How to build framework with xcassets

I tried to build an framework with its own image and it compiles fine. However, when I include my framework in another project, it crashes when loading the image, any idea? ImageTest (my framework) public class ImageTest { open func getImage()…
Willjay
  • 6,381
  • 4
  • 33
  • 58
5
votes
1 answer

Getting images from Cocoapod's xcassets doesn't work

I am using the 1Password Pod and the GCast pod and they both have xcassets files with the assets they want you to use. When I create a button in IB and assign it the name of one of the images in the xcassets file, the correct image shows up but on…
Mark Bourke
  • 9,806
  • 7
  • 26
  • 30
1 2
3
15 16