UITextView showing distorted at run time in XCode 8 - uitextview

STORYBOARD
Simulator/Device:
There are no constraints warming or error of any kind.
Xcode 8, iOS 10
UPDATE:
I have removed the UIView and still the concave shape coming (UITextView color is set gray at run-time). Unable to judge anything from storyboard nor from constraint setup.
UPDATE 2 : I have found UITextView textContainer is messing things up and layer.cornerRadius also making things worse.

Related

How Can I Fix Inconsistent Text Downscaling with a Rich Text Label In Godot?

I have a rich text label that works fine under a resolution of 1920x1080. However, when scaled down to the resolution on my laptop, which has a 1366x768 resolution, the text on said label becomes janky and malformed.
Some lines are cut off at the top or the bottom, and others are squished (as you can see in the image at lines 3, 6, and 13).
I'm using Godot v3.5.1 and the text font is Noto Sans Regular from here
I tried enabling mipmaps, using the filter, disabling anti aliasing, disabling font oversampling and enabling GPU pixel snap under Project Settings > Rendering > 2D > Snapping. And out of all of those, only the pixel snap setting worked. Completely fixes the issue and the text is rendered properly.
However, this completely breaks an animation of a spinning circle that plays at basically all times during the actual gameplay. It becomes stuttered and shakes instead of the normally smooth animation it has otherwise. I realize this may possibly be fixed by using SVG instead of PNG sprites, but I feel like that's not an ideal solution in case other sprites get added. Especially since my game will also allow community members to add their own sprites for their own game play.
So is there any way to fix the text without breaking the animations, or make it so that the animations don't break with pixel snap enabled?

PyQt5 font size changing between desktop and surface pro

I wrote a GUI for my desktop a while ago and have just tried to run it on a surface pro 3 only to find the fonts are all exceeding their bounding boxes. Labels are exceeding the worst. Disabling the bold attribute helps when it comes to buttons but not by much.
I have checked to make sure the chosen fonts are compatible for both devices.
Has anyone else encountered this issue and know of a fix for it?
Thanks,

monogame screen resolution is incorrect

Monogame, or XNA really, is reporting the wrong screen resolution on my Surface Pro 3.
Using GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width and Height returns dimensions of 800 x 600, which is incorrect. So, I cannot set up my game size correctly.
I've been using this code without problem on an Acer V5 and can set the game resolution to a size I expect. This is because the GraphicsAdapter reports the correct screen size.
Whether using it as is, or docking the tablet with an external monitor, returns exactly the same resolution. What error is causing this?
This used to be a bug in Monogame, and was fixed.
If you are not building from the latest source code, it is possible that you still have the bug in your monogame dll.
See:
https://github.com/danzel/MonoGame/commit/0c36642129d89a12b30bcfc7d13256739d5483af

Rotation for some elements

I am trying to do thing that is already done in default Android 2.3 camera application - rotation only for some elements (such as buttons) when changing orientation of the device.
For example, when I switch my phone to landscape orientation I don't need to change whole layout - I only need to rotate some UI elements.
Don't know about Camera application in Android 4, but in Android 2.2 it looks the same as I want.
Is it possible?
(and sorry for bad English, guys)
This is an old question but I've just stumbled across it by accident. In case anybody finds this and is stumped there are two easy solutions. Your elements support a 'rotate' attribute which can do most of the hard work for it (just set an angle), but beware this seems to change the canvas dimensions and can leave you with empty padding. There is also a Rotate Drawable which will help you rotate other drawables.

Animating UIButton alpha with a PNG background: why does the animation get bright white as it transitions from alpha = 0 to alpha = 1?

This is something that is stumping me; I have a simple UIButton with the following PNG as it's background:
I'm using an iOS 4 block animation, and all I'm doing is animating it's alpha property from 0.0 to 1.0. However, while the animation is in progress, the UIButton gets bright white, before finally settling to look like the above image when the property reaches 1.0.
I'm pretty stumped - if, for example, I open that image in Paint.NET and slide the image's opacity from 0 to 255, I see a nice fade-in effect - which is exactly what I'm going for. But when I animate an opacity change in iOS, the button gets bright white during the middle part of the animation.
If I change the animation's duration to something extended, like 5 seconds, the effect is even more prominent. Any ideas?
Edit: I am using Xcode 4.1, and running iOS 4.3.3 (first gen iPad).
It turns out, after much consideration, that the issue was my UIButton was a Round Rect button; the type needed to be changed to Custom. Even though the background images I set for my button worked when the type was Round Rect, applying an alpha animation to the button still caused the default white Round Rect style to appear for the duration of the animation. That is what my eyes interpreted as "bright white" during the animation - it had nothing to do with my PNG background, and everything to do with the underlying type of the button I was using.
Problem solved. Moral of the story? Change your UIButton type to Custom if you're going to animate the button while using your own background images.

Resources