I have a view that makes available the delegate method scrollViewWillEndDragging:withVelocity:targetContentOffset:
, on iOS 6 setting targetContentOffset seems to work flawlessly but when setting targetContentOffset in iOS 7 it doesn't seem to do anything.
The specific code is very simple:
[Export("scrollViewWillEndDragging:withVelocity:targetContentOffset:"), CompilerGenerated]
public virtual void WillEndDragging(UIScrollView scrollView, PointF velocity, ref PointF targetContentOffset)
{
targetContentOffset.X = scrollView.ContentOffset.X;
}
In iOS 6 the scroll view stops moving but in iOS 7 it acts as though targetContentOffset was not set. I looked through the new documentation on Apple's site and did not see anything that seemed to have changed here. I also created a native app with a very simple configuration and the scrolling stopped as was expected, the code for that delegate is as follows:
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
{
targetContentOffset->x = scrollView.contentOffset.x;
}
I have added Console.Log.WriteLine to the Xamarin code and am sure that my method is being called. Any help would be grateful. I'm using the most recent alpha release of Xamarin, I'm also not using autolayout.
--mike