Connection controller image aspect fill on iOS GoogleCast SDK - ios

Is there a way on the GoogleCast SDK to make this header image scale to fill the width of the screen? I wasn't able to do it using the styling properties available on the SDK.
I tried setting values such as adImageContentMode and backgroundImageContentMode on the connectionController property of the castViews style, but it didn't work.

Related

ios 11 - Icons alignment distortion

We had to create a 64bit build of our application, due to iOS 11 enforcement. We've effectively done that but stuck in icons alignment in our XIB files.
In our old builds the icons used to appear like vertically aligned. But now the icons are appearing horizontally aligned with text. I have tried to set custom offsets, apply Auto Layout and Trait Variations from Interface builder Document properties.
How it appears as of now in other devices, this is the desired behavior as well:
How it appears right now:
It's the new feature of iOS 11 User Interface on iPad (refer to this WWDC talk).
I don't think you can do anything with standard exposed configuration options unless you use a custom component.
Or you can subclass and trick the component to think that it's always in compact size class as described here:
https://stackoverflow.com/a/45945937/1463411

Unity Canvas scale issue on iOS

I've got a weird issue with Unity, where the height of the screen doesn't match the layout built in the editor, but only on iOS. It does work in the editor, in a Windows standalone and in the Android app, but not on iOS (im testing on an iPhone 5).
So the menu layout can be broken down to just a couple of full width images with different y-positions. These images are set to stretch in height, so no matter how I change the play-preview in the editor, they always fill the screen as intended.
As soon as I test it on the iPhone however, it looks like there was height added to the screen after calculating all the image heights or something. Every image seems to be about 10% too short.
This all did work some weeks ago, when I was on an older iOS version, xcode version and Unity version, but I updated them all in the meantime, so I can't say which one could be the cause for this.
Some weeks ago, the minimum iOS version in Unity was set to 7.0, now it has to be at least 8.0 to not get the "update project settings" warning in xcode.
The roughly 10% could be the iOS status bar, which could be taken into account for the height calculations, but then turned off and the game can span over the whole height.
The iOS "Resolution and Presentation" settings are set to require fullscreen and hide status bar.
Edit:
Here's what it looks like in the editor and on iOS.
The 4 different canvas have just different settings for the canvas scaler. The images in all of them have their RectTransform set to stretch in both directions.
It turned out to be caused by the generation of mipmaps.
I don't know why this is the cause and I don't know, why it's only a problem on iOS, but not on any other common platform, but once I used an image that had mipmaps disabled, it worked.
It then also worked on the original images, once I deactivated the mipmaps there.
I guess it has someting to do with the gradient images being 1x1920, so mipmaps make little sense. I'm wondering, why this is making the height buggy and not the width.

iOS: font sizes in a React Native view do not match iOS native font sizes

I have two views: a React Native view and an iOS native view. They both contain labels. Labels has font size 14. But on iPhone 6 font sizes are different: the iOS native view has bigger letters than a React Native view. I need to make the fonts the same. Could you help me, please?
Fixed. The reason of the issue was the following: a text size was changed on the iPhone in Settings -> Display & Brightness -> Text Size. React Native supports Dynamic Type, but the application hardcoded the text size in the native code. To fix the issue it is needed to support Dynamic Type on the native app side. See details about how to support it here: How to use a custom font with dynamic text sizes in iOS7
I had the same problem.
try this:
<Text allowFontScaling={false}>
Hi! I will not change. I don't respect settings.
</Text>
I found it here: https://joshbuchea.com/react-native-text-size-font-scaling.

Interface Builder, frame changes on IOS 6

I have a xib file that support IOS 6 and 7.
The problem is when i selected view as IOS 6 the frame from IOS 7 change, and vice versa.
Here is a screenshot, previewing the IOS 6.1.
I adjust the frame to (0, -3, 255, 85) and when adjust the frame using view as IOS 7 the frame becomes:
(-345,894,0,0).
When i adjust the frame using view as IOS 6.1 and early the frame changes for IOS 7.
I just want to use the same frame in both IOS version.
Some informations that may be relevant:
Was an existing project build for IOS 5.1 and later, then i update the project to support IOS 7.
When i made the update some views (include this one) have their frame changed to positions that does not make any sense and size their size set (0,0).
First i think was an interface builder issue preview issue, but i tested on devices with IOS 6 and 7 and the results are the same from the preview
Thanks in advanced!
When you assign bottom margin & top margin in Autoresizing tab, iOS 7 gets confused & produces strange effects.
I faced the same problem, & i solved it using height stretch. Refer image.
Use 'iOS 6/7 deltas' fields to adjust design element(s) position on your controller for different iOS.
You should setup your project (setup how UI view) for one of iOS versions (6.1 or earlier/7.0 or later) and then adjust interface by deltas to other version.
You also can use new preview mode to see difference between two operation systems on one screen.
Here is link to APPLE iOS 7 transition guide - https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html#//apple_ref/doc/uid/TP40013174-CH14-SW1
First set your view size as none and then Set your frame using view as iOS 6.1 and earlier. Now test in iOS 6 and 7. It will automatically resize your view frame.

Default UIProgressView rendering on iOS7 using iOS6 SDK

I am experience a rendering bug when using the default progress view. Rather than being 9px tall, the view is clipped to about 4px when using the default progress view. My app is built with the iOS6 SDK, and the issue appear when running on a iOS7 device. The interface is built with interface builder.
Is there a simple fix for this issue? Switching the style from "Default" to "Bar" in interface builder fixes the problem, but that changes the appearance.
Setting the frame in code helped me solve this.
#iPP 's answer is not the best. Setting the frame in code will cause your code to be riddled with iOS version checks, and that code tends to get very complicated when supporting multiple device orientations.
I think the best way is to use new feature "iOS 6/7 Deltas" in Xcode 5.
And "iOS 6/7 Deltas" key usage is:
When Auto Layout is turned off, you will notice an area in the sizing tab of the utility area (right pane) of Interface Builder that allows you to set iOS 6/7 Deltas. Deltas can be set individually for each view and work as you would expect. If your storyboard or nib is set to view as iOS 6, then setting the deltas will cause that view to be shifted and/or resized by the set delta amount when run in iOS 7. Alternately, if your storyboard or nib is set to view in iOS 7, then the deltas will be applied when run in iOS 6. Both of these tools help you to support older versions of iOS alongside iOS 7
for UIProgressView, here you can try to set "delta Y" to be -7px, because iOS 7 just reduce the Y origin of UIProgressView by 7 px, so when running in iOS7, we should give it back the 7px.
It's like the iOS7 cut the progress view use the iOS7 Style's frame.
You have two ways.
1. set the progress view style ---bar, you can do this in the nib file or code.
2. use the code to set the frame. Something like:
progressView.frame = CGRectMake(x,y,w,h);
The second will face the layout issue when you rotate or change the layout.
So the easiest way is set the progress view's style.

Resources