scalable ios splash image in xamarin forms - forms

I am working with xamarin forms and now I am seting the IOS splash image in the splash.storyboard... I followed some tutorials and I setted "W any x H any" and "generic" in the configurations required...The image appears, it is a background image. The problems is: If I select the GENERIC option, the image is too large and in the iphone it doesnt seem good...I need a Scalable Splah image, how can I do that?
I am using windows for it...but I can use a mac too.

You can add an ImageView into the ViewController instead of setting the BackgroundImage of the root view. With this, you can have the flexibility to set constraint according to your needs. You can learn more about auto layout HERE.
In addition, you can also set image with different resolution in iPhone and iPad inside your asset catalog.

Related

How To set Launch Images for Universal app

I'm using Xcode 10.1 and my app is a universal app. I'm having a design issue when loading the launch images using the assets i.e. it showing some black screen background in iPad Pro 11 inch and iPad pro 12.9 (3rd generation) devices other than that it working fine in all devices. So how can solve that issue? And If I want to use the LaunchScreen.storyboard file how can I set a single image to satisfy all screen sizes(which image size and what resolution(2x or 3x) have to use) ? or how to use the Static Launch Screen Images by the apple click here?
Any help appreciated.
As you wrote there are two ways to configure the LaunchScreen:
Static image from the special imagest - LaunchImage.launchimage
Designed screen that can hold multiple UI elements - LaunchScreen.storyboard
If your launch screen is simple enough and you choose to use Static image please make sure that your Info.plist doesn't hold the following key: <key>UILaunchStoryboardName</key> <string>LaunchScreen</string>, if it does then the static image won't be used.
The LaunchImage.launchimage holds an image for all device types and tells you which image size to use.
If you use it and do populate all the images and still some devices has no launch image try cleaning and rebuilding your app and uninstalling and reinstalling the app from your test device or simulator. Also consider updating your environment (xCode).
If you choose to use Designed screen please avoid setting the source of your ImageView to the LaunchImage.launchimage, its a special imageset. You can only use regular x.imagesets with less images (1x 2x R4 3x).
Take a look at the following answer to a different question, it explains the mechanism that auto selects the image, it also has table that connects iPhone type to the selected image.

Make a iphone 3 app fit the iphone 5 4-inch screen

I have a Xcode project for a iphone app that has been designed to be universal and has a deployment target of 4.3. The project uses a .xib file for constructing the user interface and I am only familiar with storyboards. My goal is to make the app that only works on the 3.5 screen fit the iphone 5 4-inch screen. Do you guys have any tutorials online or tips on how I can do this? Thanks in advance!
The process is pretty simple:
Make sure you have a Default-568h#2x.png default image. See App Launch (Default) Images in the iOS App Programming Guide for information about these default images, sizes, etc. But by adding this default image, that informs iOS that your app supports the 4" screen.
When designing your NIBs, you can toggle the simulated metrics between 4" and 3.5" to see how the view is rendered for both:
You can then adjust your autosizing masks for your various controls so they resize correctly. This is an example where the margins are all fixed and it should grow as you go to 4" screen:
"All" you have to do is properly set the struts-and-springs "autoresizing masks" in Interface Builder. The same as you'd do for Storyboards.
A friendly tip while at it: don't do storyboards except for the simplest of apps, and don't use auto layout before you're familiar with struts-and-springs and are absolutely sure you can't use struts-and-springs to do your work.
Turn off auto layout in new .xibs here:
Of course, if you have device-specific artwork (such as a background that's exactly 960x640), you'll have to do more work than that, but you're prepared for that piece of the puzzle, right?
Next, add a Default-568h#2x.png file to your project. Make it 1136x640, or if you're not covering the status bar area, make it 1096x640.

Universal App not detecting iPad images

I have an app which I'm converting to a universal binary.
The app uses a custom table view within a Tabbar controller which draws different sizes depending on the detected screenBound height.
It draws the table just fine on different devices but the rows in the table view use images as buttons.
image.png and image#2x.png work just fine but the app is failing to recognise image~ipad.png (have also tried image-ipad.png)
So no matter what I do the table is using iPhone images on iPad.
Have been trying for hours to figure out why. Please help.
Check that your image is targeted to the app in Developer Tools. Select an image and then place a checkmark in Utility panel on the right

How does a UIStoryBoard change on iphone 5

I have an already shipped app on App Store that made use of Storyboard.
I see from the keynote, comparing to previous model that iPhone 5 has a taller screen.
I wonder how this will impact on my esisting storyboard, because from my 'app point of view' there's only one difference which is the background.png. All the rest is just plain UITableView that can just fit more rows.
I cannot find any document for this on Apple site (I have always been so noob in finding things on Apple developer site).
Has anyone made adjustment to his already developed and published app to match with new layout ?
If yes, do I have to develop a brand new storyboard, or is there an adjustment to be done with code ?
[UPDATE]
I am reporting my experience, now that Xcode 4.5 is long shipped for development.
Xcode itself, as some suggested, asked me if I would like to enable tallest screen support by creating a default png. After saying yes, I had to enter each segue in storyboard for some adjustment, change png background (which was unstrechable by design) with a tallest one, change stretching settings and redeploy.
It has been an annoying work because I have quite some segues, and Xcode doesn't allow to reuse templates within Interface Builder.
Old apps without 1136x640 resolution support will run letterboxed, with black areas on top and bottom.
You can enable new layout support for existing project simply by supplying new Default-568h#2x.png loading screen. Take heed though, you'll have to test your old interface on both old and new resolution (via iOS Simulator) to make sure everything looks good and works as designed.
Its been said when iphone 5 is launched that your app view will be filled with black color on top and bottom if it is not taking account for the increase size ( not designed for iphone5 screen)
so your app will just work fine but will have black border on both and top to filled the extra space..

Dynamically change launch image in iOS

I have a sponsor logo on the launch image. Is there a way to dynamically change the launch image to rotate sponsor logos?
Thanks
The default image for an iphone app must be a fixed image file in your bundle. You cannot change it dynamically.
However, you can have a dynamic image that appears when the app loads after the launch image. You can set that up with animations or simply to select a random image each time.
According to Apple's HIG, Human Interface Guide, the splash screen is supposed to be used only as a placeholder to give the user the illusion the app is open while it completes it's startup process.
Apple will allow some use of the startup screen, but know they can and do have the right to reject your app solely on how you use it.
Like the previous answer stated, you could do anything you want after the initial startup screen has passed. Play a video, run an animation, or display a second view with your sponsored images.
And finally, I don't recommend doing this, but if you are determined to work something into the startup screen, you could try this.
The splash screen is hardcoded or set to 1 filename. Before your app closes, you could dynamically replace the hardcoded filename with a new file from a webservice or local storage, replacing the existing splash screen image. I haven't tried this, but it is more than likely possible. Just beware that it may not pass muster with Apple's approval process. Good luck.
As i needed different images on iPhone & iPad Splash screens, i followed below steps:
1. Add two UIImageViews
2. Set Width & Height constants for both UIImageViews as per your requirements.
3. Now select the iPhone UIImageView and set its Height Constraints Regular Regular (RR) height constant as 0.
4. Do the same for for iPad UIImageView and set its Height Regular Regular (RR) height constant as actual required height and set 0 to the Constant.
5. When you test it on iPhone the iPad ImageView will disappear and vice-versa will happen on iPad.