UITabBar image incorrectly positioned on iPad when inside splitview + navcontroller - ios

I have a hierarchy like so:
In storyboard, on iPhones (in all orientations), and when using iPad split screen with another app (see screenshot below with contacts side by side) this all works great.
However, when the iPad app has the full screen, my tab bar images are horizontal instead of vertical.
Anyone know of a way to force the tab bar to change the orientation of it's images so it's vertical? It's almost like the OS doesn't recognize that it should be using the compact traits for this mode on iPad.
Further details:
This is an iPad 9th Gen simulator on iOS 15.4. and is also present on a real iPad (5th gen iOS 15).
I am using SF Symbols for the image in the tab bar
I am using the technique described here so that I can have more fine grained control over whether any given view should be shown in the master nav/tab view or if it should show up in the detail view.
I am using .allVisible for the preferredDisplayMode, tried changing it to primary over with no luck.

Related

Why does my display look different on iPhone simulator vs. iPad simulator?

I am working on a puzzle app on Xcode Version 11.0. My app displays as expected on my physical iPad mini and also on the iPhone simulators, but if I use an iPad simulator it appears to switch the orientation to Portrait mode and display my secondary screen as a popup on top of the secondary screen (see the images below).
I am using an "Action Segue" to get from my 1st screen to my 2nd screen. I have tried several different options (Show, Show Detail, Show Modally, Present As Popover). The result is slightly different, but all of them give the "Portrait popup" look. I am guessing that this is a newer feature, and I just need to set some flag to avoid it, but I don't have any guesses on what to look for. Could anyone offer some help?
iPhone 8 Simulator (this is what I want it to look like)
iPad Simulator (with undesired Portrait popup appearance)
Edit the segue to be Show Modally and also Fullscreen (instead of Automatic).

How to force UITabBar compact design when in landscape on iPhone X?

So, I'm having a problem with the UITabBar on iPhone X.
The problem is that the tab bar doesn't adjust the icons when it is in landscape mode, like the UITabBarController.
1 - I've set the safe area settings.
2 - I've put the tab bar inside a UI view.
But this only fixes the tab bar misplacement on iPhone X.
My problem is better described in the image below:
When running on iPhone 8 (anyone but iPhone X) the tab bar works like expected. But when running (the same view, with no changes) on iPhone X, the adjustment simply doesn't happen when in landscape mode. Is there a code that I should explicitly "tell" to the tab bar adjust?

UIPopoverController with navigation bar inconsistent on device and simulator

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.

How can I implement the new iPad-like landscape mode on iPhone 6 plus

Apple has introduced a new iPad-like split view in landscape mode for iPhone plus, which help users take advantage of their larger screen.
I have designed an universal iOS app which uses UISplitViewController to show detail and master view in iPad, and uses UINavigationViewController to show the TableView in iPhone.
Now that we have iPhone plus, how can I implement the new iPad-like landscape view while I am using UINavigationViewController as the main structure in iPhone.
You might want to take a look at the "Building Adaptive Apps with UIKit" video on https://developer.apple.com/videos/wwdc/2014/
De basic idea is that the split view controller is used on iPhone and iPad. But when it detects that the device has a "Compact" horizontal size class it pushes the detailview on top of the master view, whereas with a "Regular" size class it shows the detailview next to the master view.

Apps UIWebView stuck on landscape on iPad on iOS 7

I have an iOS 5 + app I am getting ready for iOS 7.
I have a standard TabBar based app loading in viewcontrollers, one of which loads in a webView.
This webview has a landscape and portrait mode as the app can be rotated, this works fine on all devices except iPad running iOS 7.
The issue being the webview is always displayed as landscape on iPad on iOS 7 irrespective of the orientation, iOS 7 gets rid of the 2x button that you used to get with iPhone apps running on an iPad so it is faux full screen.
The app opens in portrait mode, if I rotate the iPad everything else rotates - all other views adjust and reposition - except the html in the webview - it is stuck on landscape.
This happens on device and simulator
The question I suppose is why? has anyone else had experience of this?
Many thanks
Try setting constraints on the UIWebView. In the storyboard, look for the menu icons on the bottom right, and select the one that looks like a tie fighter. Then select 'Add Missing Constraints' or 'Reset to Suggested Constraints'. then when your View changes (orientation), the space constraints will adjust.

Resources