When I write an app an view it on my phone, I have a non-translucent navigation bar. However, when I view on an iPod touch, it does have a translucent bar. This seems to vary from device to device, and it's not app specific either.
This has happened with three different apps I've worked on, with all sorts of devices. All of them are using UINavigationController through a storyboard.
I have seen this in several of my applications now, and I'm wondering if there's a setting I'm missing. Has anyone else seen this, or know why it happens?
Related
I have a simple popover for a UINavigationController that is anchored on the root views right bar button item. On the iPhone simulator (I tried it on various devices) the navigation bar of the popover aligns nicely with the navigation bar of the root view. I assume this is taken care of by UIKit. Here is a screenshot of the simulator.
However on my physical device there is a slight offset. This is a screenshot on my iPhone 6 physical device. It's weird because there's no offset for the iPhone 6 simulation. Notice they bottoms of the navigation bars are not aligned.
I couldn't find any stack overflow questions addressing this and I'm not sure how to fix it since all we're "supposed" to do is specify the popover anchor (as the plus button) and let UIKit take care of the rest. Is there any way to fix this programmatically? I'm not using storyboards or xibs. I also have touch assist enabled on my physical device.
I have seen a couple of issues similar to this but theirs seemed to be in the main view of their app. I have tried some of their suggestions like deselecting "Safe Area Relieve Margins" in the Size Inspector pane but none have worked. In the Detail side of my iPad app, the background color of my navigation bar stops at the status bar.
In this screenshot, I tried to use MMDrawerController to see if using something other than UISplitViewController would work but I have the same problem for both. So far the only difference between the two libraries is I haven't seen UISplitViewController work at all but with MMDrawerController, if you set openDrawerGestureModeMask to MMOpenDrawerGestureModePanningCenterView and the master view stretches a little bit then the background color renders correctly.
I saw on one of the other post that their issue was a bug for Xcode and there had been several people who already filed their bug Apple. Could this be a separate issue that Apple needs to know about as well if it is a iOS bug?
This is not an issue for iOS 9.X or 10.X, only 11.X.
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).
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.
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;