Reputation: 52143
I have a UILabel and UITextView added into a UIViewController's view like in the screenshot below.
When I typed some words and uitextview starts scrolling, it overlaps the title of the label like below.
I tried to set textView's textContainerInset but it didn't work as I expected. It started the text 10pt below the normal position but still overlapped when it was scrolled.
textView.textContainerInset = UIEdgeInsetsMake(10, 0, 0, 0);
Upvotes: 0
Views: 519
Reputation: 11197
It seems that you have place TextView upon UILabel. Move the UILabel up or TextView down, hope that will solve the problem.
CGRect frame = theLabel.frame;
frame.origin.y = frame.origin.y - 20;
theLabel.frame= frame;
This will move the label 20px up.
Hope this helps... :)
Upvotes: 1