resources

Adding multiple resources with the same name to Xcode for iPhone

自古美人都是妖i 提交于 2020-01-01 09:58:34
问题 Is it possible to use double names for images into the resource group? Thanks :) 回答1: You can have multiple resources with the same name as long as (1) they are not in the same directory, and (2) You've added the resources to your Xcode project by reference. (1) because no directory can contain two files with the same name (2) because Xcode respects directory structures for directories added by reference (if you add it directly to the project, Xcode tosses everything into the root level of

Adding multiple resources with the same name to Xcode for iPhone

有些话、适合烂在心里 提交于 2020-01-01 09:58:12
问题 Is it possible to use double names for images into the resource group? Thanks :) 回答1: You can have multiple resources with the same name as long as (1) they are not in the same directory, and (2) You've added the resources to your Xcode project by reference. (1) because no directory can contain two files with the same name (2) because Xcode respects directory structures for directories added by reference (if you add it directly to the project, Xcode tosses everything into the root level of

URLWithString returns nil for resource path - iphone

我怕爱的太早我们不能终老 提交于 2020-01-01 09:24:12
问题 Having a problem getting the URL for a resource for some reason: This code is in viewDidLoad, and it's worked in other applications, but not here for some reason: NSString* audioString = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"wav"]; NSLog(@"AUDIO STRING: %@" , audioString); NSURL* audioURL = [NSURL URLWithString:audioString]; NSLog(@"AUDIO URL: %d" , audioURL); NSError* playererror; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:audioURL error:&playererror];

Loop through embedded resources of different languages/cultures in C#

早过忘川 提交于 2020-01-01 09:17:09
问题 One level up from this question, what would be the way to store all (and loop through) available resources and associated cultures, to allow user selection of a specific culture? Further explanation: Suppose three resource files: GUILanguage.resx GUILanguage.fr.resx GUILanguage.it.resx I could have a string in each called LanguageName . How would I be able to programmatically loop through the different LanguageName values to list them (in say a list box)? EDIT: WinForms project, embedded

Getting iPhone mainBundle Files

China☆狼群 提交于 2020-01-01 09:13:10
问题 I dont know the exact code i need to retrieve all of the filenames of the resources in my iphone apps mainBundle. if i could have some kind of code like: NSArray *array = [[NSBundle mainBundle] getAllResourceFilenames]; it would be helpful. thanks inadvanced for any help! 回答1: You should look at the SDK documentation for NSFileManager, but this will get you started: NSString *path = [[NSBundle mainBundle] resourcePath]; NSFileManager *fm = [NSFileManager defaultManager]; NSError *error = nil;

How to update Dynamic Resource within a Dynamic Resource?

▼魔方 西西 提交于 2020-01-01 09:08:27
问题 I have a visual brush which is a group of shapes, the main colour of which is a dynamic resource itself - so the shape is for example MyShape and the Colour, MyColour which is referenced by the Shape object. My problem is when I update the colour for this - it only happens the first time the shape is loaded (the colour needs to be set first) however as much as I change the colour it won't update the dynamic resource that uses the colour - how do I make this work? Just need to make a dynamic

Adding layout resources to androidTest

我们两清 提交于 2020-01-01 08:22:47
问题 I would like to add layout xml files into my androidTest folder to be used only for testing. I added res/layout folder to androidTest and tried to add a layout file to it. But it gives error URI is not registered for xmlns:android="http://schemas.android.com/apk/res/android" Somehow the project does not recognize it as valid layout file. 回答1: It is tricky to add xml resources to androidTest . Android Instrumentation tests create another APK to run the tests against your original application.

Adding layout resources to androidTest

半城伤御伤魂 提交于 2020-01-01 08:20:00
问题 I would like to add layout xml files into my androidTest folder to be used only for testing. I added res/layout folder to androidTest and tried to add a layout file to it. But it gives error URI is not registered for xmlns:android="http://schemas.android.com/apk/res/android" Somehow the project does not recognize it as valid layout file. 回答1: It is tricky to add xml resources to androidTest . Android Instrumentation tests create another APK to run the tests against your original application.

color value drawable resource issue

匆匆过客 提交于 2020-01-01 08:06:41
问题 I have an image that is 1900*1200 in a folder called drawable-sw600dp that id like to have used on a nexus 7. When I try to run the app the main activity the screen is white and I get the following error: java.lang.NumberFormatException: Color value '@drawable-sw600dp/background5' must start with # at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:71) at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:248) at android.content.res

How to embed an icon (.ico) in a static library (Visual Studio)

倖福魔咒の 提交于 2020-01-01 07:21:08
问题 Is there a way to embed resources (such as icons, dialogs) in a c++ (Win32 API) static library? My purpose is to embed an icon in the static library in a way that functions that use LoadIcon will work as if it was a normal .exe so the main application can only link to the static library and include a header file, with no requirement to add other files such as .rc files, or .ico files, etc. Clearly the main application who uses the static library doesn't have this resource so LoadIcon will