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.
Related
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.
This question already has answers here:
iOS 9 Xcode 7 - Application appears with black bars on top and bottom
(17 answers)
Closed 6 years ago.
Recently I've upgraded to XCode 7 and have been having some trouble with screen sizes on my application, mainly black bars the appear at the top and bottom of the screen.
I've read through similar threads and implemented the fixes suggested which was adding a launch screen image and that worked for my iPhone 6's size but when I try running the simulator for the iPhone 6+ the black bars at the top and bottom of the screen are still there.
Also the screen wont resize for smaller versions either and parts get cut off or go off screen.
Any help would be greatly appreciated, thanks!
I ran into this problem last week updating an old app. Adding a launch screen image won't entirely solve it. Instead, you need to create a new launch screen.storyboard (File -> New -> File -> User Interface Tab (on the left) -> Launch Screen
Then in your project settings, set your launch screen file to the .storyboard file you just created. This should automatically fix the black bars.
I've got this application mainly displaying photographs.
The app was originally written for iOS 3.1 and upgraded to 4 before beeing published. It was not touched ever since. Now that the owner of the API appied some changes which ain't as compatible as they thought, I am forced to update the app. So I'll have to go for iPhone 5 and 6 and 6+ and iOS 7 and 8 updates in one go.
I observe this behaviour in the simulator of iphone 4, 5 and 6+ dimensions.
Portrait looks fine.
Landscape left looks fine too.
Landscape right is screwed up. Apparently it looks as if the whole screen were shifted to the left.
This is strange because I am not aware of anything that I would do different for landscape right or left. All I am doing is differnicating between any portrait and any landscape orientation.
It worked fine in the old version. But frankly I cannot reproduce this any more because I don't have access to the old xcode and sdk versions. But the app is in store for years and works fine on modern devices and modern OS versions.
A bit more background info, just in case it is of importance:
The app is based on a UITabBar, but it is not visible in this view.
The image is scrollable. It is placed on one view three times of the size of the screen with preceeding and succeeding image views place to the left and right respectively. This view with the three images is placed within a scroll view of the size of the screen or window respectively. This concept still works file, it is just shifted.
When I check the view item's frames in debugger or with NSLog, they all seem to be right, starting at (0.0/0.0) or respectively.
The view on the bottom with the four buttons that navigate to related functions and their view controllers, is re-alligned programmatically on each rotation, as well as the overlays with the textual information. All works as it should but it's shifted in this one orientation.
Well, all views are layouted programmatically on each rotation.
There are no constraints defined.
iOS6/7 deltas are all set to 0.
The app "wants fullscreen". By tapping on the image all UI items disappear and re-appear on the next tab. (Just by setting the .hidden attribute. Except for the navigation bar. Thats managed using setNavigationBarHidden:animated: with YES on animated) Works fine, even in the shifted view.
I am running out of ideas.
While I put all the details together for the question, eventually one idea came to my rescue.
The issue is related to hiding the tab bar. I could not use the regular way of hiding the tab bar because then it would not re-appear when navigating down to the functions that are associated with the buttons on the bottom overlay view.
Therefore I did some sort of hack. I did not hide it regularily but moved the tab bar out of the screen.
AND: This was the only thing that I did differently for landscape right and landscape left. I just searched for the constant names and found it.
Apparently, manipulating the tab bar view had a flaw in older iOS versions. (Or in older SDK versions, I am still working on that important detail)
To overcome the flaw the tab bar view was modified this way for landscape right:
[self.tabBarController.view setFrame:CGRectMake(0-kTabBarHeight,0,width+kTabBarHeight,height)];
This does not seem to make sense but did help me out a lot on similar issues years ago when the app was written.
Now, I changed this to:
[self.tabBarController.view setFrame:CGRectMake(0,0,width+kTabBarHeight,height)];
which is the same for landscape left too.
For the time beeing I separate between iOS versions >= 8.0 and smaller. But I'll double check that with older devices and may get back to this answer later.
I leave the question posted because I found the original "hack" here on SO too, so that I guess that others will have the same issues when updating to ios 8 or SDK 8 respectively.
Thanks for listening.
I have been stuck at this for days. The problem is that the collection view that is in a tab bar after its first load. It will be display incorrectly. If I press any tab the problem will disappear forever until the app is restarted. Note that it's not just a white space that appearing. The whole container is getting shift down so the white space appear.
This problem only seem to exists on the iPhone and not the simulator. Tried it with iPhone 4 and 5.
After a second try I think it only happens in iOS 7 and not iOS 8
Can confirm that it only happens on iOS 7. Upgraded one iPhone 5 to iOS 8 and the bug is gone while another iPhone 5 is still iOS 7 and the problem appears every time.
See the white space below?
It disappear after I press another tab
It doesn't even come back if I go back to the original one
I uploaded an example project with this problem here: https://github.com/athiwatc/UITabBarDisplayWrongPosition
Change the constraints as in the following screen shot:
I have recently updated my XCode to 5.0.1 as to be able to test my application on iOS 7.
Everything seems to be working as expected, but for some reason the status bar is overlapping the screen's content.
Now, I am still able to see the overlapped content as the status bar in iOS 7 is translucent, but it looks very weird.
I could always move my content down a bit to compensate for the height taken up by the status bar, but how would that look in iOS 6??
Is this intentional on Apple's part? Is there a standard procedure we as developers are supposed to follow to get this looking how it should?
Also, should I just add 20 pixels (or whatever the height of the status bar is) to the top of my view and just forget about iOS 6?
I have decided to just set my Top Space to: Superview to 20 (the height of the status bar) for all my parent views.
Looks good on iOS 7 but there is a 20pixel gap on iOS 6, and given the fact that 80% of our iPhone users have already updated their OSes to 7, I think it's safe to just assume that eventually everyone will be using iOS 7 and support for iOS 6 will no longer be needed.
I'm not gonna break my head anymore over this.
Thanks anyways!