Fitting content to iPhone screen - ios

I'm developing a kind of home automation app for iOS. I'm currently running into a spacing problem that I want to have a nice solution to.
The app is always showing a navigation bar and a tab bar, which is quite space consuming. This is a big problem on the current page I'm implementing, which is the Graphs page. In portrait, the spacing is decent, but in landscape mode, I feel like the graphs should be bigger and take up more space than in portrait mode, which is simply not possible with the tab bar and navigation bar.
So my initial thoughts here are if it's "allowed" to hide either the tab bar or navigation bar when in landscape mode (and keep them in portrait mode). What will Apple's reviewers think of this and what will the users think? Will they be confused? Do you guys have any other possible solutions to this?
I'm developing on a iPhone 4C which is quite small. I'm sure it wouldn't be a problem on the iPhone 6, but these small screens needs to be supported.
Thanks for some input on this.

It's absolutely no problem to hide bars in one mode and show them in another, there are a lot of apps that do it, especially when showing graphs.
Alternatively you could hide the bars after a few seconds, and show them again when the user taps the screen or scrolls around (see Safari mobile for an example).

Related

Turn off split view for iPhone (all sizes), but retain split view for iPad

1.) We have a universal iOS app that incorporates split view and slide-over for iPad. Just right. For iPhone, on the other hand, we do not want to use these features.
2.) Split view does not appear for smaller iPhones, even in landscape, which is the desired behavior. Just right, again. However, larger iPhones in landscape mode do by default, utilize split view, which is not the desired behavior.
3.) Split view on larger iPhones can be disabled at the user level(iOS 14): settings -> display and brightness -> view and select "Zoom". That does achieve the intended result. However, user may not find that feature desirable for all of their apps across their device. It also requires a certain level of user sophistication to figure this out. For these reasons, that is not a viable solution.
4.) There is an info.plist option called UIRequiresFullScreen, which achieves the intended result for iPhone, however it also disables split screen and slide-over for iPad, which is not the intended result. We want this only to apply to iPhone. That is therefore not a viable solution either.
Seems there is likely a simple solution to the problem of turning off split view for larger iPhones for a universal iOS app, so the larger iPhones function just like the smaller iPhones. Thoughts?
Responder dfd helped steer our thinking back on the right track. The solution is not to try to remove the iPhone splitViewController feature of iOS, but as dfd pointed out, we should embrace the feature. Thinking in splitViewController mode, rather than trying to force the larger iPhone to be a smaller iPhone, the behavior we are looking for in landscape view on larger iPhones is:
splitViewController.preferredDisplayMode = .primaryHidden
Calling this preferredDisplayMode on rotation on iPhone provides just the solution we were looking for. Thanks to all who took the time to review our question!

Why does the iOS Status bar change size on some apps?

Main question:
This may be a simpleton question but I noticed on the lock screen the iOS status bar is bigger than the usual 20 points. Even when I turn location setting off and close all apps. the iOS lock screens status bar is bigger when compared to the iOS status bar when my iPhone is in an un-locked state. Why is that?
Second kinda related to the first question:
also when I open grabTaxi found here the status bar is bigger than usual. Please download the app to see what I am talking about. you can't really tell by just looking at the screen shots.
Did the grab taxi developers decide to make their status bar bigger than the default?
Is it because grabTaxi is using some cross platform language, resulting in a bigger status bar?
Do apple make the status bar bigger on the lock screen simply because its easier to see?
I figured it out, apps that don't have a launch screen file, will have a bigger status bar. more detail here
How to enable native resolution for apps on iPhone 6 and 6 Plus?
If an app is using your location and you lock the device, and if the app continues to use your location in the background, a large status bar is shown to remind you that the app is still using your location.
My iPhone's status bar on lock screen is also bigger than normal, so I think Apple makes it bigger on lock screen for some reason.Maybe just because that it's easier to see.
For your another question, I downloaded GrabTaxi and used it. And maybe it's just because GrabTaxi doesn't adapt to 4.7-inch or 5.5-inch screen.

iOS UIAlertController appears bigger than normal

I bought an iOS application template, but I was wondering why the UIAlertController and the status bar do not appear like normal. It appears bigger than the default design.
Why is this happening and how can I solve it?
If your app is not optimized to fit iPhone6/6Plus screen, then it's UI will behave as if it is iPhone5/5s and everything will look bigger than usual.
That might be the reason for zoomed status bar and UIAlertController.

Screen Shift on UIInterfaceOrientationLandscapeRight

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.

Keeping UIStatusBar out of the layout before iOS7

In my iOS application, Status Bar is normally hidden (on start of the application too).
In some parts of the application I make it visible.
On iOS6 and iOS7 layout works perfectly and Status Bar overlaps any views on both iOS versions (I already want it to overlap, so it is OK).
However, I noticed that while on iOS6 and while the status bar is visible, if I rotate the device (my application supports every orientation), the layout is shifted down because of the Status Bar and I can not fix it after that point.
What am I doing wrong? How can I make it overlap the views on rotation change too?
The solution was obvious though it can be forgotten. (like in my situation)
self.wantsFullScreenLayout=YES;

Resources