Re: iOS 8 beta 4 messes with my TextView
Re: iOS 8 beta 4 messes with my TextView
- Subject: Re: iOS 8 beta 4 messes with my TextView
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 30 Jul 2014 09:55:11 +0700
On 29 Jul 2014, at 22:06, Kyle Sluder <email@hidden> wrote:
> On Jul 29, 2014, at 1:58 AM, "Gerriet M. Denkmann" <email@hidden> wrote:
>>
>> Master Detail app, works fine in 7.1.2.
>> The Detail View has a UITextView.
>> Whenever I get a Keyboard Notification (Changed) I change the height of the TextView accordingly.
>>
>> All would be fine; but after all Notifications have been delivered and before I can start typing, some evil agent resets the height of my TextView back to the old (and now, with a keyboard present, much too big) value.
>
>> Any known work-arounds?
>
> You probably shouldn't be changing the frame of your text view. Rather, set its contentInset.
You are right (as was Scott, when he suggested that there was a tug of war between me and auto-layout).
Changing the old and bad:
text.frame.size.height += delta
to the new:
text.contentInset.bottom -= delta
works much better indeed.
Works fine in both 7.1 and 8.0.
Thanks a lot for your help!
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden