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
1
vote
1 answer

UIImage imageNamed: always returns image at 1x

This is my code: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self baseInit]; } return self; } - (id)initWithCoder:(NSCoder *)aDecoder { if ((self = [super…
Pipelynx
  • 63
  • 8
1
vote
1 answer

Images.xcassets add iPhone 6 and iPhone 6 plus images

I need to use background image for next screen sizes: 960 x 640 1136 x 640 1334 x 750 2208 x 1242 In Main storyboard I just use one file name and I like it, because I can set all images in assets for just one item. How can I set my Images.xcassets…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
1
vote
1 answer

How to use Image assets in iOS

I would like to use the launch images from the xcasset; I've already tried some ways but I can't get it works. I've the standard LaunchImage asset, and the image file are called Default[@2x,...]. Using [UIImage imageNamed:@"LaunchImage"]; always…
Nicolò Ciraci
  • 678
  • 5
  • 23
1
vote
2 answers

How to have resources in an iOS framework xcode6 beta

I'm trying to set up a framework for iOS. It is a little basic UIFramework and I'd like to to contain fonts and images for buttons and such I'd like to reuse across multiple apps. Is there anyway to bundle resources in the new frameworks in the…
1
vote
1 answer

xcassets and In-House Deployment

Thank's to everyone who take the time to read this. Sorry for my bad english. I have a problem with the images on my iOS app. On my device and on the simulator: there are no problem. But after the in-house deployment, there are no image on the…
tatianag
  • 165
  • 2
  • 14
1
vote
1 answer

Xcode Image Asset Catelogue

I would like to use backgroundimage on UIButton with little arrow at bottom. In Assest catalogue I have slice image but result is not what I want. Result is there anyway I can add another vertical line? I could use exact size but button size is…
Nitya
  • 849
  • 1
  • 11
  • 25
1
vote
2 answers

Using Images.xcassets in Xcode 6 beta

I have a project where I use Images.xcassets to organize my image resources. After update to Xcode 6 beta no image is displayed when the application runs. It looks like Xcode can't find path. I found a temporary solution – old way: Add folder with…
AlexEdunov
  • 357
  • 1
  • 15
1
vote
1 answer

Image.xcassets: Can I specify different app icons for iOS 6 and 7?

I'd like to use different app icons on iOS 6 and 7. (I need this due to the different rounded rectangle shapes because my icon includes a border line.) For most sizes this is not a problem because the sizes are different. However, the iOS 6…
Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213
1
vote
2 answers

Xcode Image Assets return the wrong image for retina devices

I've got an image assets catalog in Xcode 5 and two images in it. This is what the folder structure looks like This is the contents of the json file: { "images" : [ { "idiom" : "ipad", "scale" : "1x", "filename" :…
Andrew
  • 3,166
  • 21
  • 32
0
votes
0 answers

Cocoapods framework: Assets is in different bundle with framework's bundle

I have a framework mixed Objective-C and Swift using CocoaPods for distribution. The issue is it cannot load images stored in the framework's Assets. This is the code I used to load the image: let currentBundle = Bundle(for: .self) let…
James. H
  • 1
  • 1
0
votes
0 answers

xcassets import a folder of images by creating folder references and not actual copy

I'm trying to import a folder which contains hundred of images to xcassets. By importing it normally, the problem is that all the actual images are copied (Contents.json file is also generated for each one of them). I would like them to not be…
angelos_lex
  • 1,593
  • 16
  • 24
0
votes
0 answers

XCAsset of type App Icon does not load the image inside the app if downloaded from the App Store

I am using the XCAsset method to provide alternate app icons (documentation here) On my view controller where I show the icons for the user to choose, I use the XCAssets as source of the image displayed. Everything works great except after the app…
Kuringan
  • 147
  • 6
0
votes
1 answer

Load image to uiimageview based on the selected target in Xcode

I'm trying to create two applications from same codebase. These application will have same functionality but different logos, app name etc. I have created two targets with different bundle Ids so now I get unique apps when running each target.In my…
Lak
  • 381
  • 1
  • 5
  • 23
0
votes
1 answer

Xcode: Share assets between multiple targets

I have an Xcode project with two targets. I want to share assets between the two targets so as to avoid duplicate files. What I've tried: Create SharedAssets.xcassets Add SharedAssets.xcassets to both targets (when you create the .xcassets folder,…
West1
  • 1,430
  • 16
  • 27
0
votes
1 answer

How to add GIF file in Xcode assets foler?

I'm using Xcode 12.4 and I want to use GIF image in my app. So I put GIF Image in Assets.xcassets folder. But UIImage can't recognize the GIF file with this error message CoreUI: attempting to lookup a named image 'imgname' with a type that is not a…
Gabul
  • 21
  • 6