Reputation: 91
I have a UITextView
that I am resizing using a UIPinchGestureRecognizer
:
@IBAction func handlePinch(recognizer : UIPinchGestureRecognizer) {
if let view = recognizer.view {
view.transform = CGAffineTransformScale(view.transform,
recognizer.scale, recognizer.scale)
recognizer.scale = 1
}
self.textView.textContainer.size = self.textView.bounds.size
}
All my text is displayed until I resize the UITextView
using the above func. Once I resize smaller, the textContainer
is smaller in both height and width. I have tried to change bounds.size
to frame.size
. I have autoresizesubview = true
already. Can't figure this one out...I have tried almost everything.
Upvotes: 3
Views: 971