How can I change this picture of my application?
Right now it's just the default image, but I just can't find a way to change it.
Edit: These are all the icons I have already set:
you have to reference an image as app icon in the Player Settings.
and all images you require in
Note that the given image resolution has to match the required resolution.
And also the Splash image
Alternatively you can also configure them using the Package.appxmanifest in VisualStudio before deploying or building the app package
Note I'm also pretty sure the ending e.g. imageName.scale-200.png is mandatory so check if your images are named correctly!
Related
I don't know where to store images and how to get the images by their id and this new gui is good but there are no tutorials on how to use it.
The images are stored in the resource file (theme.res) which lets you use features such as multi-image (an image that adapts to DPI.
You can edit the resource file via CSS or the designer (depending on your configuration). Assuming you didn't enable CSS you can use the following toolbar option to add an images directly from the GUI builder.
Notice these 3 icons on the top right area:
When you hover over them you should see the following tooltips:
Add Image
Add Multi Image
Set Multi Image Import DPI
They all do what you expect. The last one shows you this dialog:
Here you can define the density to which you designed the image you're importing. That way it will be logically scaled to all the other densities so an image designed for a 600ppi device will look similar on a 300ppi device (ppi == Pixels Per Inch).
I agree the UX should be improved here so I added an RFE for fixing this in a future update.
I am new to cocos2D.
As my title says, how can I change my default splash image?
In my project, I removed all of the built-in images (splash image) come with cocos2d when you create a project. Then I ran my app. Why do I still see the built-in image (splash image that i removed) when my project it started?
I tried to find my solution on google but i could not find anything useful.
So, please help me resolve this issue. It may be very useful for a beginner.
I think the file is called 'Default.png', and you replace it with what you want. If you've already deleted the 'Default.png' file, create a new one.
The 'Default.png' should be placed in the root.
Then Build ->Clean All Targets
Create an image 320×480 for portrait mode
Place the following
#define CC_CODE_IDE_DEBUG_SUPPORT 0
at
Appdelegate.cpp
Which is at
Framworks --. runtime-src -->classes folder
Just delete "Default.png" from your resources. And add an image with name Default.png which you want as Splash into your resources.
Thanks
Be sure you replace all the Default files in the Resources folder with your own art. For example:
Default-568#2x.png
Default.png
Default#2x.png
hello i am creating an iOS app using cocoa and xcode
i am very new to the whole thing and have gotten kind of lost.
in part of my application the user must choose a picture from the library or using a camera, then some text is added to it(just like "id cap that").
the question is where would i add the text and how do i save it to the phone?
i know there is a allowsImageEditing property, the question is how to i edit it so that instead of crop and zoom it will add text and have an option of saving.
thank you
The system determines what kind of editing is allowed. You can only tell it whether it's allowed or not, but you cannot choose what type of editing. If you want to add a caption to an image, you'll have to use Core Graphics to do so. Or, if you don't care about the image being saved with the caption on it, you can simply use a UILabel on top of a UIImageView.
In my application I need to get the correct image based on the device iPad/iPhone 4/iPhone 3 device.
For example:
I have an image named a.png (width 40,height 20) for iPhone 3/iPod, and a#2x.png (width 80,height 40) for iPhone 4.
If I mentioned the code
UIImage *myImage=[UIImage imageNamed:#"a.png"];
myImage contains (80*40) image if it's iPhone 4.
myImage contains (40*20) image if it's iPod/iPhone 3.
My question is how do I get the image for iPad (60*30) like above naming convention.
I tried giving a~ipad.png as an image name and it's not working. Can you point out where there is a mistake?
And if I use the condition using [UIDevice currentDevice]; isIpod -> load(60*30) image
otherwise load images for iPhone/iPod it's working fine.
But I need to get it to work without using the condition, and using the naming convention like a.png for iPhone/iPod, a.#2x.png for iPhone 4 and likewise for iPad.
Thanks in advance.
I know it is old post, but I think Screenshot gives more clear idea about naming convention.
With latest devices: button#3x~iphone.png and button#3x~ipad.png
According to this Apple doc, there is an image naming convention for devices:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html#//apple_ref/doc/uid/10000051i-CH7-SW17
It says to use "~iphone" for iPhone, and no suffix for iPad. Though anecdotally I have been told that "~ipad" also works.
There is no image naming convention for iPad, it's only for retina displays so that your images will appear crisp. If you want to support iPad then you need to create a separate layout for it (separate xib), even separate set of images in most cases because you were given a bigger layout.
You can, however, create a naming convention for yourself and pass the string name to a static function that will convert the name to an iPad / iphone depending on the device.
E.g.
[UIImage imageNamed: [MyAppUtils getImageName:#"a.png"]];
and inside the getImageName function, you can do your conversion (use the same name if iphone, else rename to something else)
Further to Nate's post, the specific documentation from Apple describing the naming convention can be found at:
Supporting High-Resolution Screens - Updating Your Image Resource Files
According to the link, the naming convention pattern is as follows:
Standard: <ImageName><device_modifier>.<filename_extension>
High resolution: <ImageName>#2x<device_modifier>.<filename_extension>
For example: "MyImage#2x~ipad.png" for a high-res iPad-specific image or "MyImage~iphone.png" for a standard-res iPhone-specific image.
I am using a "Resource Manager" that I developed first before creating any application.
This Resource Manager can decide about the naming convention after loading the resource configuration files (mostly XML).
This way everything is transparent to the programmer of the GUI, you only need to worry about creating the content :)
This might come across as a very silly question. I am trying to place an image behind my first "Hello World" app on iphone, since this morning. I tried doing so using Interface Builder using UIImageView object from library and also tried doing so programmatically.
Googling hasn't be much of an help either. Can any one please demonstrate a simple app that shows how to display an image in an iphone app, in background and/or in foreground?
The step you're missing is likely adding the image to the project.
Drag an image from the finder to the Resources section of the project outline. Xcode infers the action from the file type, and images will be copied to the Resources folder. You can check it out in the Targets section of the project outline, if you disclose your Hello World target you'll see the different build phases, including a "Copy bundle resources" build phase.
Anyway once the image is added to your project, the UIImageView inspector image name will autocomplete your image name, and all should work. No code needed.
You could try to add a UIImageView, in IB, to your view and arrange it to the background (behind all labels, etc)
edit: I just realized, you already tried it in IB. I was ignorant, I'm sorry.
The thing is, I do this same trick myself, and it works. If you add a UIImageView to your view in IB, what happens? Does it stick to the foreground? If so, you can re-arrange the position of the object by using the 'Layout' menu.
edit2: I just searched the iphone reference library, and the "Hello World" example also shows how it is done. (http://developer.apple.com/iphone/prerelease/library/samplecode/HelloWorld/index.html)