Re: Why does changing a UIScrollView's contentInset change contentOffset?
Re: Why does changing a UIScrollView's contentInset change contentOffset?
- Subject: Re: Why does changing a UIScrollView's contentInset change contentOffset?
- From: Matt Neuburg <email@hidden>
- Date: Fri, 11 Nov 2011 09:46:52 -0800
On Thu, 10 Nov 2011 07:48:56 -0800, Matt Neuburg <email@hidden> said:
>On Tue, 08 Nov 2011 12:05:55 -0500, David Hoerl <email@hidden> said:
>>when I set "contentInset" that contentOffset was getting set to
>>0,0.
>>
>>Is this known behavior (or desired behavior?)
>
>Don't beat yourself up over this. You figured it out (well done!), the workaround is obvious, and now you can move on. But feel free to file a bug. Many, many little things like this changed between iOS 4.3 and 5.0 because people filed bugs. (I wish Apple would *document* all those little fixes. I just discovered that in 5.0, reloadSectionIndexTitles is no longer a no-op - it actually does what the documentation says it's supposed to do, for the first time ever.) m.
By the way, I just tested this:
NSLog(@"%@", NSStringFromCGPoint(sv.contentOffset));
sv.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
NSLog(@"%@", NSStringFromCGPoint(sv.contentOffset));
The contentOffset did not change. So it may be necessary for you to explore your situation further, as the problem does not demonstrate itself easily. You will likely want to reduce your project to its bare essentials in order to include a demonstration in the bugreporter. (And I'd be glad to see such a demonstration too!) m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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