> On May 24, 2016, at 4:38 PM, Doug Hill <cocoa...@breaqz.com> wrote:
> 
> 
>> On May 24, 2016, at 3:48 PM, Kyle Sluder <k...@ksluder.com> wrote:
>> 
>> On Tue, May 24, 2016, at 05:46 PM, Kyle Sluder wrote:
>>> On Tue, May 24, 2016, at 05:37 PM, Alex Zavatone wrote:
>>>> 
>>>> On May 24, 2016, at 4:02 PM, Kyle Sluder wrote:
>>>> 
>>>>> On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote:
>>>>>> OK, this might have been more obvious to people, but it finally came to
>>>>>> me how to handle the keyboard display.
>>>>>> 
>>>>>> Instead of changing the view size, I move the center of the view up, then
>>>>>> apply a content inset to the table to adjust for the part of the table
>>>>>> offscreen. Animations seem to work much better now.
>>>>> 
>>>>> Did you really mean “move the center of the view”? Or did you mean
>>>>> scrolling the center of the viewport?
>>>>> 
>>>>> Either way, contentInset is definitely the way to handle this.
>>>> 
>>>> Just checking.  You meant to use contentInset and not contentOffset? 
>>> 
>>> Yes, I meant contentInset. contentOffset is just another name for
>>> self.bounds.origin.
>> 
>> To clarify: you might want to change both the contentInset (to avoid the
>> keyboard) *and* the contentOffset (to move content that has been
>> obscured by the keyboard back into the visible part of the scrollview.)
>> 
>> --Kyle Sluder
> 
> Thanks for the tip, I’ll try that too.

OK, now I remember why I adjusted the center rather than the content offset. I 
have an aggregate view with a table and a text input field. The text input 
field is outside of the table since I don’t want it to scroll with the table. 
So, I move the aggregate view up as a single unit to be out of the way of the 
keyboard.

Doug Hill
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to