UIWindow rendering using LaunchScreen image vs LaunchScreen story board - ios

After the migration request that Apple has been requesting since this summer. I have successfully implemented the use of LaunchScreen with storyboard.
But this is not without consequences.
It has an impact on the displayed UI. I was wondering if it was possible to continue using the LaunchScreen storyboard but still display the old way with a black bar above and below when displaying the UI after login. This is because I have a large number of screens to edit.
As example, if FinishedLaunching I use these line:
mWindow = new UIWindow(new CGRect(0, 10, 320.0f, 569.0f));
mWindow.MakeKeyAndVisible()..
Instead of
mWindow = new UIWindow(UIScreen.MainScreen.Bounds)
I can see my UI rendered correctly. But it appears in the upper left corner instead of being resized to full screen.
Thanks.
Jp

the old way with a black bar above and below when displaying the UI after login
The black bar was your bug. Because you had no launch storyboard, the app was being displayed in a special letterboxed mode, occupying only part of the screen. (See for example When upgrading to support iPhone X, font display smaller on older devices) Now you have fixed the bug at last and your app is displaying correctly, occupying the entire screen.

Related

App Content not filling simulator window

Just having an Xcode issue that I'm sure is tied to some setting I can't find. Im my storyboard, my content fills the entire view (i.e a background image), but then when I run my app in the iPhone 6 simulator, the background image and all the content don't fill the entire screen. There is white space to the right of and below the content on the simulated "screen".
When I run the app in the iPhone 5 simulator, this isn't an issue and it fills the entire simulated view.
So, what did I miss? I want to make my app work on all models of the iPhone.
Thanks for any help!
There are several ways to solve this, and I guess you are using View Size as Inferred or iPhone4 Inch in Attribute Inspector.
First way is to use AutoLayout at Storyboard to add Constraint.
If you don't want to use this, you should at least set the Autoresizing at Size Inspector.
"White space to the right of and below the content" sounds like there are scroll bars being displayed in your window. The iPhone 6 simulator is a different size, as well, which would account for them not being there on the iPhone 5 sim.
Have you tried going to the Home Screen (Shift + Command + H) in your simulator, and seeing if the white bars remain? On my computer, the white bars are always visible. Annoying, yes, but they don't cover anything or hide any part of the view. It's just a bit of white padding on two sides.

Xamarin iOS iPhone 6 Plus Not Filling Entire Screen

I have a default existing project in Xamarin.Forms version 1.2.3 and I have the same issue as reported here hinting that auto-layouts should be used.
When I start the iPhone 6 Plus app, there is about 1cm black bar at the top and bottom of the page, with even the task notification bar at the top moved to the smaller size screen displayed when launching.
Its probably a one liner change but what and where does this need to be done?
I'm rather surprised this is not in the default template already however.

Using a launch screen (.xib) stops scaling

It's my understanding that apps for iOS 8 should have a storyboard file as launch screen rather than an image. I've created a really simple launch screen file that has any width and any height, and has one label of plain text reading "placeholder" and set it as my launch screen. However, when I try to run my app on the iPhone 6 and 6 Plus simulators, there's black bars around the background and the buttons on the main menu are out of place. The problem doesn't seem to be present in the 5s or iPad. Most of my assets aren't optimized for the 6 and 6 Plus though, since they were created before they came out. Is that why this is happening? Or is it something else? Thanks in advance.
Edit: Apparently, putting in a launch screen stops the app from automatically scaling. Is there a way to have both a launch screen, and keep the app scaling? Or do I need to make new assets?
This is a bit of an old question, and I ended up using a launch image instead of a launch screen, but you can probably solve this by using constraints. If you set top, bottom, leading, and/or trailing constraints on an item in the view, it'll scale itself to fit those constraints (if possible). For text, it has the autoshrink property which you can change to minimum font scale (instead of fixed font size), though I'm not sure how you can scale text up. The autolayout documentation is here.
To create a launch screen from a xib file first create a new file from under “User Interface” and select the option called “Launch Screen”
Using autolayout, design the first view of you app so it scales to suit all resolutions that your app supports.
Using the new Launch Screen
Under the app setting select the newly created Launch Screen from the app options.
This is the example for using a xib file. It can also be done using storyboard as shown in Ole Begemann blog

UIView not resizing correctly

For some strange reason, every new UIViewController I add into my project is not resizing according to the screen.
As you can see here in Xcode I'm using Retina 3.5 Inch Full Screen and it's supposed to look like this.
But in the iPhone the lower part of the screen is not being shown. This is what I see in a real iPhone 4.
As you can see, the button in the inferior part of the screen is behind that white bar and I can't click it.
I've really tried everything and I don't know what I'm missing.
I'm also tagging Objective-C as this could be cross platform.
I fixed the issue thanks to Luca. I was using a component for a Menu Bar that made the screen not to resize properly to 3.5 inch. Removed it and now everything works.

iPhone app loading

When I load my iPhone app it always loads a black screen first then pops up the main window. This happens even with a simple empty app with a single window loaded.
I've noticed that when loading, most apps zoom in on the main window (or scale it to fit the screen, however you want to think about it) and then load the content of the screen, with no black screen (see the Contacts app for an example).
How do I achieve this effect?
Add a Default.png to your project. This should be the image you want shown instead of the black launch screen.
Also just to save you some time, there is no way to change this image during the runtime of your application. If you look at Apple's Clock application you can see how depending on the last state of the application, the Default.png changes. You cannot do this in your own app because of permission limits. Also, make sure to read the iPhone HIG for best practices on Default.png use, in short, dont use it as a splash screen like Twitteriffic.
You can also take a screenshot of your app as an aid to creating the Default.png - while holding the Home button, press and release the Lock Sleep/Wake button. The screenshot can be find in your Camery Roll library in the Photos app and can be synced back to your desktop.
When the app transitions from the launch image to the actual app content, it should not be jarring to a user - content (text/images) can be added to the screen, but content should never change. If all this leaves you with is an empty blue header, a white body, and a blue footer - then that's all you should have. If you have a persistent tab bar on the bottom & a localized app (different text descriptions), then then launch image should appear with icons but no text. (See Clock.app & Facebook.app for examples.)
Screenshots can also be taken in XCode using the Screenshot tab in the Organizer window and a plugged-in device.

Resources