Thursday, August 11, 2022
HomeiOS Developmentios - TextView Begins to shrink the content material view as soon...

ios – TextView Begins to shrink the content material view as soon as rotated previous a sure level


As you’ll be able to see within the video beneath, the textual content begins to clip to an more and more shrinking rect because the textView rotates past a sure level. How can I get the textual content to stay in place all through the rotation?

Right here is my rotation Code. I’ve tried rotating the view’s rework in addition to the layer’s rework.

func rotate(radians: CGFloat) {
    netRotation += radians // property that tracks rotation over time for different functions
    layer.rework = CATransform3DRotate(layer.rework, radians, 0, 0, 1)
}

Listed below are the properties I set on the textView

textComponent.centerXAnchor.constraint(equalTo: superView.centerXAnchor)
textComponent.centerYAnchor.constraint(equalTo: superView.centerYAnchor)
textComponent.isScrollEnabled = false
textComponent.translatesAutoresizingMasksIntoConstraints = false
clipsToBounds = false

enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments