• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Animating UIScrollView frame change without moving contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Animating UIScrollView frame change without moving contents


  • Subject: Re: Animating UIScrollView frame change without moving contents
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 20 Feb 2014 08:24:56 +0100

On 19 Feb 2014, at 21:17, Rick Mann <email@hidden> wrote:
> On Feb 19, 2014, at 09:01 , Kyle Sluder <email@hidden> wrote:
>
>> On Tue, Feb 18, 2014, at 06:00 PM, Rick Mann wrote:
>>> I tried to set the contentOffset in the same animation block, but that
>>> just makes the content move smoothly.
>>
>> Don't move the scroll view. Have the banner appear over the scroll view
>> and change the scroll view's contentInset instead.
>
> I tried that, too. Same behavior. When you adjust the top of the left, the content moves relative to the top-left corner. I tried changing the contentOffset at the same time, to no avail.

 FWIW, I can tell you it’s possible, we do this in our electronic program guide view. We have a “details” area at the top that pops out when you tap a TV show in the scroll view, moving down the scroll view, and, when possible, we try to avoid scrolling the contents (if the tapped item would end up underneath the ‘details’ area, we obviously need to scroll it down a little so it stays visible).

 What call exactly are you using? I think I may be using setContentOffset:animated: (there’s also scrollRectToVisible:animated:), have you tried that one? I’ll see if I can look up what we’re doing later when I have some code in front of me.

 Did you say you were using layout constraints? This code is older, so I don’t think we’re using constraint-based layout there yet.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


_______________________________________________

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


References: 
 >Re: Animating UIScrollView frame change without moving contents (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Animating UIScrollView frame change without moving contents
  • Next by Date: [MEET] Toronto CocoaHeads / tacow - March 4
  • Previous by thread: Re: Animating UIScrollView frame change without moving contents
  • Next by thread: [MEET] Toronto CocoaHeads / tacow - March 4
  • Index(es):
    • Date
    • Thread