Thank you glow!
Indeed. This would explain the problems I'm seeing. I redesigned the screen to only have one Paste control on it and it is placed in the dedicated cell with only a help label below it. Even when sizing that dedicated UIPasteControl - until it stopped "touching" the neighbour controls, it was asking for the permission. I can see the point in avoiding obscuring its parts.
How can we define the UIPasteControl sizing requirements properly to be sure to give it enough space? I'm trying its intrinsic size and it always returns as zero rect. I'm trying to achieve its size predictability via minimumContentSizeCategory and maximumContentSizeCategory, so it has a predictable size for the different accessibility text sizes.
What's the correct way of placing/sizing this control in a storyboard with auto layout?
The example here:
https://developer.apple.com/documentation/uikit/uipastecontrol?changes=_5
Suggests:
pasteButton.frame = CGRect(x: view.bounds.width/2.0, y: view.bounds.height/2.0, width: 150, height: 60)
Is it something considered the safe dimensions for the UIPasteControl for all of the accessibility text sizes? Width of 150 doesn't seem to be "safe" - the whole UIPasteControl may not be even shown or it might be raising the permission alert, if the control itself shows.
Is it something that needs to be embedded into SwiftUI? Or would it work well in some sort of a container like UIStackView, would this one size it properly for all of the accessibility text sizes?
Some pointers would be appreciated so we can build future-proof designs that would not break easily.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: