xcasset

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

你。 提交于 2019-12-19 03:44:15
问题 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 the images on disk is 19.1MB, but when we archive the app the Assets.car file that is generated is 6 times larger than that. I have tried using PNGs and compressing them, but the size is still huge. I'm not sure what else I can do. 回答1: It turns out

Xcode 6 - xcassets for universal image support

半世苍凉 提交于 2019-12-17 02:26:57
问题 Currently working on a universal SpriteKit project. I'll be supporting the following devices: iPhone 4/s, iPhone 5/c/s, iPhone 6, iPhone 6+ iPad non-ret, iPad retina I am confused on the iPhone part. I already have 4 versions for my background sprite for the 4 different screen resolutions of the iPhones. But which goes to which? I know the 3x is for the 6+, and I think the 5/c/s goes to the Retina 4 2x, but I do not know where the iPhone4/s, and 6 go. Anyone know? Side note, when I create a

Images.xcassets breaking the laws of targets

亡梦爱人 提交于 2019-12-12 14:32:35
问题 Ok so i'm pulling my teeth out over this one and I sincerely hope i've made a stupid mistake (there have been some late nights involved). Short back story, we are building a product that needs to be brand-able as multiple customers will share 90% the same UI and code, with some config options to turn things on / off and different colours, fonts and images etc. All working fine except the .xcassets folders. I have 1 per customer, currently they have the same asset names, with different images.

UIImage imageNamed: always returns image at 1x

。_饼干妹妹 提交于 2019-12-11 10:28:52
问题 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 initWithCoder:aDecoder])) { [self baseInit]; } return self; } - (void)baseInit { _selectedImage = [UIImage imageNamed:@"SelectedStar"]; _deselectedImage = [UIImage imageNamed:@"DeselectedStar"]; _rating = 6.5f; _editable = NO; _imageViews = [[NSMutableArray alloc] init]; _maxRating = 10;

scaleMode .fill not filling the scene view on iPad

£可爱£侵袭症+ 提交于 2019-12-11 07:15:48
问题 I created my game using the Universal images of dimensions 1136x640 (@2x) and 2208x1242 (@3x) for my start background. I changed the scaleMode property to .fill for iPad but it just fills the center with black borders all around. I thought .fill was suppose to extend the width and height to fill the scene view. I found a sample universal project that I tested and the images scaled with .fill for the iPad. They used, 568x320 (@1x), 1136x640 (@2x) and 1704x960 (@3x) for their images. I copied

Get Data from XCAsset catalog

倖福魔咒の 提交于 2019-12-09 15:10:10
问题 I understand that to get images from the asset catalog i can use UIImage(named: "fileName") to do it. however, what if i am getting DATA from the XCAsset catalog? I can't figure this out. I have tried, let url = NSBundle.mainBundle().URLForResource("fileName", withExtension: nil) let data = NSData(contentsOfURL: url!) But it is nil. I do not know how to get data from the XCAssets catalog. If anyone can help me out (googling hasn't helped) please let me know I will be very thankful! Update:

Image resources (xcassets) not displayed correctly on Yosemite in application built on El Capitan using xcode6.4

送分小仙女□ 提交于 2019-12-09 02:55:03
问题 When I build my application on El Capitan using Xcode6.4 (Xcode7 is no option right now), all images/icons (except the AppIcon) does not show, or looks garbled. Looking at the output from the asset compiler it looks fine, but there are two outputs I suspect could be related, but I am far from certain: 2015-10-02 12:26:53.569 ibtoold[28899:273288] NSFileCoordinator is doing nothing. 2015-10-02 12:26:54.906 ibtoold[28899:276436] CoreUI(DEBUG): CSIGenerator using 'LZFSE' Compression coreui

Xcode Image Catalogs: Image not showing in Interface Builder

≯℡__Kan透↙ 提交于 2019-12-07 10:47:55
问题 So, the artist sent me a Resources.xcassets folder that I simply dragged into the project. I then jumped to interface builder, added a new UIImageView, assigned an image name from the xcassets, and to my surprise, I couldn't see the images. It shows as a blue question mark. Notice, that the IB autocomplete is working, and when I run the application, the assets actually show up! But not in interface builder, which makes laying the assets around virtually impossible, especially with the size to

Loading a UIImage from xcassets

蓝咒 提交于 2019-12-07 07:16:29
问题 I'm trying to load a launch image from the Image.xcassets folder but to no avail. There are other answers (and this one) on SO that purport to answer it but their main solution, to simply load an image like so UIImage *image = [UIImage imageNamed:@"Default@2x"]; returns nil for me. The filename is named correctly and the project is setup to use the assets. Does anyone have any idea how I do this or what I could be doing wrong? Thanks in advance. EDIT: EDIT 2: my final code: -(void)

Loading a UIImage from xcassets

ぐ巨炮叔叔 提交于 2019-12-05 17:15:52
I'm trying to load a launch image from the Image.xcassets folder but to no avail. There are other answer s (and this one ) on SO that purport to answer it but their main solution, to simply load an image like so UIImage *image = [UIImage imageNamed:@"Default@2x"]; returns nil for me. The filename is named correctly and the project is setup to use the assets. Does anyone have any idea how I do this or what I could be doing wrong? Thanks in advance. EDIT: EDIT 2: my final code: -(void) loadSplashImage{ if ([self isiPad]){ self.imageViewSplash.image = [UIImage imageNamed:@"Default-Portrait"]; }