I am developing a Windows 8 metro (yeah!) app. How do i provide a screen resolution dependent image source ?
As per these guidelines, we can achieve it using image naming convention too.
I have an image control as show below.
<Image Source="Assets/test.jpeg"/>
I also have test.scale-100.jpg, test.scale-140.jpg & test.scale-180.jpg images in asset folder. Each image having different icon color to identify which image is loaded.
If i run the app in simulator and change screen resolutions, i still see test.scale-100.jpg for any resolution. Why is this happening ? In which case will the OS load test.scale-140.jpg or test.scale-180.jpg image ?
EDIT: I got it working. Once your app starts in simulator, close it by pressing home buton & uninstall it. In VS, right click on Project and click on Deploy. App should be now deployed to simulator. Change the resolution and start the app. You should now see correct image loaded by OS. Rinse and repeat to test other resolutions.
The scaling is automatic. If your images are correctly named, and you change resolution in the simulator you must restart the app to see scaled images. It doesn't happen on the fly, IIRC.
Finally got it working. close the app and uninstall it from
simulator.
In VS, right click the project and click deploy.
Change to desired screen resolution and start the app. OS should not pick proper image as per resolution.
Rinse and repeat same to test images on various resolutions.
Related
Currently i am using device_preview flutter package.
after i preview different device screen, MediaQuery.of(context).size.width will change according to the preview device, but for MediaQueryData.fromWindow(WidgetsBinding.instance.window) size is still showing emulator screen size.
i need to inherit MediaQueryData as well when device preview screen change
How to get rid of this default white launch screen in ios? I have deployed my app in App store , this screen is still showing in live version . I want to start my app with my custom splash screen.
How to solve this? anybody can help please.
Thank you in advance.
In iOS content displayed on Splash screen is loaded from LaunchScreen.xib file.
To view this file:
Open your project in xcode.
On the left menu, expand your project node and then expand your project framework node.
There you will find LaunchScreen.xib file, open that.
Once you open it, you will find configuration settings on right bar where you set the attributes of the content to be displayed, but before that make sure that you have placed your necessary image files on image assets, in order to be accessible from the configurations settings.
You can use react-native-splash-screen in order to hide the default splash screen configured in ios/YourAppName/Base.lproj/LaunchScreen.xib.
This default splash screen will still be seen very briefly so you can get rid of the text in it and change the colour if needed (in your favorite IDE) to have a nice transition to the next screen (your custom react-native splash screen).
About a week ago xcode showed me some error and when I clicked to solve the problem, xcode added this picture:
My questions are: What is it good for? Why do I need it?
Thank you.
Yes you must include one.
From Apple's Interface Guidelines
To enhance the user’s experience at app launch, you must provide at least one launch image. A launch image looks very similar to the first screen your app displays. iOS displays this image instantly when the user starts your app and until the app is fully ready to use. As soon as your app is ready for use, your app displays its first screen, replacing the launch placeholder image.
Without this default image (or a LaunchScreen storyboard), your app would not take all the available screen space on iPhones with 4" displays (iPhone 5, 5s, SE). This is the default image that those iPhones would use.
Of course you can (should!) change it with the one you designed.
Runtime, leading to the top and bottom of applications were empty out a lot , because the application is based on a 320x480 size to run.
I create a new iOS project in XCode 5. I choose to use asset catalog for both app icons & launch images. When I run the application, the app icon is overlayed on the launch image. How do I prevent this?
This is my app icon:
This is launch image:
I get this as the launch image on the simulator (and in device)
For those who come here searching, I solved this issue. The launch images should be opaque and not transparent.
I used iDraw to create the launch image. Instead of exporting the entire canvas, I selected 'all objects' which created a transparent image, which caused this issue.
Now it is solved and submitted to AppStore
Small problem here, I'm building an app for ios, and I've added and icon to my project 57x57, and 114x114, but when I run my app on the device, icon is very dim, when original is very bright. How can I fix it? Does it matter if I build my app in debug mode or release?
iOS adds a gloss/shine effect to your app icon that can sometimes reduce the saturation of your image. Add the UIPrerenderedIcon flag to your info.plist file as described here to disable this.
EDITED to add iOS5 details
On iOS 5 there is a new key for specifying icons: CFBundleIcons is the raw name and it displays as 'Icon files (iOS5)' in the plist editor. To turn off the icon shine effect on iOS 5 devices you need to set the UIPrerenderedIcon flag on the Primary Icon as shown below.
To cover all cases (iOS3 - iOS5) you need to specify UIPrerenderedIcon in both places.
This is probably due to physical differences between your desktop monitor and iOS screen. Only thing you can do is redesign the icon and check the colors on an iOS device.
Check the brightness setting of your device's display. Perhaps it's not "up" as much as you think.
Or, you can disable the "shine" effect that iOS applies to your icon by adding the "Icon already includes gloss effects" boolean to your Info.plist file. That might help.