asset-catalog

How can we use Assets Catalog Colors Sets

左心房为你撑大大i 提交于 2019-11-27 09:00:26
I usually use custom UIColors on iOS using extensions with Swift but now with iOS11/XCode9 we can create Colors Sets. How can we use them? Update - Tip As @Cœur says we can drag&drop de color, and use it like a UIColor object and a possible solution could be use it as a extension: Or as a constant: Now I wanna know if we can access them like an UIImage access to an Asset Image or not, like: UIImage(named: "image-name") -> UIColor(named: "color-name") user2421361 UIColor(named: "myColor") Source: WWDC 2017 Session 237 —— What's New in MapKit Caveat: Your project's Deployment Target needs to be

Xcode project with multiple targets and multiple assets catalogs

心不动则不痛 提交于 2019-11-27 02:57:17
问题 I have a project with two targets: target A and target B. This targets generate app which are "equal" but whit different skins (different colors and images) For this, the project has two Asset Catalogs, which are identical but have different images insides. Each Asset catalog is assigned to the corresponding target. This works perfectly and I can generate both applications, but while editing the Storyboards and assigning the images I can only see the images from the first Asset Catalog. Is

Xcode 9 asset catalog Preserves Vector Data not working?

北城以北 提交于 2019-11-27 01:35:47
问题 I thought the new Preserves Vector Data checkmark in the Xcode 9 asset catalog would finally give us resizing of vector PDF images, but apparently not. Here's my test image seen at two zooms in Preview: Nice and sharp with lots of zoom, so clearly this is a vector image. But here's what two image views look like in my app: So where's my vector data? Is this much-desired feature still missing in action? Does it still work only for the automatically generated 2x and 3x images? And if so, what

iOS Launch screen in React Native

大城市里の小女人 提交于 2019-11-26 23:48:17
问题 I'm working with a React Native app and I'm trying to set a customize launch screen but I'm not able to. React Native creates a LaunchScreen.xib by default, so I've created a LaunchImage inside Images.xcassets: I've also read that I've to modify the "Launch Screen File" under "App Icons and Launch Images" in my options: Once I've done that, my launch screen became totally black and when the app is loaded, there are both top and bottom black frames: So I don't know what I have to do to set my

Xcode 5 & Asset Catalog: How to reference the LaunchImage?

回眸只為那壹抹淺笑 提交于 2019-11-26 23:21:48
I am using Xcode 5's Asset Catalog, and I would like to use my LaunchImage as the background image of my home view (a pretty common practice to make the transition from 'loading' to 'loaded' look smooth). I would like to use the same entry in the Asset Catalog to save space and not have to replicate the image in two different Image Sets. However, calling: UIImage *image = [UIImage imageNamed:@"LaunchImage"]; //returns nil Pichirichi This is the (almost) complete list of the LaunchImage (excluding the iPad images with no status bar): LaunchImage-568h@2x.png LaunchImage-700-568h@2x.png

Can I access an xcassets directory on the filesystem?

雨燕双飞 提交于 2019-11-26 16:47:36
问题 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 manually load the files each time I add new stock photos. If there are other solutions to this problem, I'm open to that but I'm also just very curious how xcassets are handled by the file system- whether they're just reference to a set of files, or

How can we use Assets Catalog Colors Sets

半腔热情 提交于 2019-11-26 14:26:21
问题 I usually use custom UIColors on iOS using extensions with Swift but now with iOS11/XCode9 we can create Colors Sets. How can we use them? Update - Tip As @Cœur says we can drag&drop de color, and use it like a UIColor object and a possible solution could be use it as a extension: Or as a constant: Now I wanna know if we can access them like an UIImage access to an Asset Image or not, like: UIImage(named: "image-name") -> UIColor(named: "color-name") 回答1: UIColor(named: "myColor") Source:

Black bars on launch screen on iPhone5 (and iPhone6)

坚强是说给别人听的谎言 提交于 2019-11-26 12:27:36
When iPhone 5 first came out we had to go through the silliness of adding a Default-568h@2x.png to the project to get the app to use the full height of the iPhone 5. In late 2014 are we still doing that? We have asset catalogs and the LaunchScreen.xib file. Do we still need to add the Default-568h@2x.png file? If so, where does it go now? I've tried a few different things and I can't get rid of the black bars in a new app created with Xcode 6 GM. As stated by rmaddy in the comments, if you are supporting iOS < 8, you still need to do this: General / App Icons and Launch Images Launch Image

Xcode 5 & Asset Catalog: How to reference the LaunchImage?

旧街凉风 提交于 2019-11-26 09:14:59
问题 I am using Xcode 5\'s Asset Catalog, and I would like to use my LaunchImage as the background image of my home view (a pretty common practice to make the transition from \'loading\' to \'loaded\' look smooth). I would like to use the same entry in the Asset Catalog to save space and not have to replicate the image in two different Image Sets. However, calling: UIImage *image = [UIImage imageNamed:@\"LaunchImage\"]; //returns nil 回答1: This is the (almost) complete list of the LaunchImage

Black bars on launch screen on iPhone5 (and iPhone6)

只愿长相守 提交于 2019-11-26 02:58:17
问题 When iPhone 5 first came out we had to go through the silliness of adding a Default-568h@2x.png to the project to get the app to use the full height of the iPhone 5. In late 2014 are we still doing that? We have asset catalogs and the LaunchScreen.xib file. Do we still need to add the Default-568h@2x.png file? If so, where does it go now? I\'ve tried a few different things and I can\'t get rid of the black bars in a new app created with Xcode 6 GM. 回答1: As stated by rmaddy in the comments, if