Bug 31729 - ScrollView.ContentOffset.Y Gets Reset When Used in a Constraint on iOS7
Summary: ScrollView.ContentOffset.Y Gets Reset When Used in a Constraint on iOS7
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 8.10
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-07 23:49 UTC by Jimmy [MSFT]
Modified: 2015-07-14 05:30 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
repro project (11.33 KB, application/zip)
2015-07-07 23:49 UTC, Jimmy [MSFT]
Details

Description Jimmy [MSFT] 2015-07-07 23:49:53 UTC
Created attachment 11922 [details]
repro project

*** Overview ***
On iOS 7, when setting a constraint’s constant to any value derived from a ScrollView’s ContentOffset.Y, it resets the ScrollView.ContentOffset.Y to 0. Even saving the value first to another variable does not fix the issue. 

This prevents the view from scrolling and makes it appear stuck. It is possible to “unstick” the ScrollView by doing a quick, large swipe.

Also, iOS 8 does not demonstrate this issue.


*** Steps to Reproduce ***
1. Run the attached repro project on an iOS 7 simulator or device
2. Scroll the ScrollView (in yellow)


*** Actual Results ***
The ScrollView will jitter and not scroll because it’s ContentOffset.Y keeps getting reset to 0.


*** Expected Results ***
The ScrollView scrolls and should hide the red colored view. It is possible to “unstick” the ScrollView by doing a quick, large swipe. 

The expected result can also be observed by running the same project on iOS 8.


*** Environment Info ***
=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: 94ce5106-6a72-4691-b34e-cd5857b1db66
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: 8.10.3.2 (Business Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Xamarin.Android ===

Version: 5.1.4.16 (Business Edition)
Android SDK: /Users/jimmygarrido/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.2.35 (Business Edition)

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.3
Darwin Jimmys-MacBook-Pro.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Udham Singh 2015-07-08 07:25:31 UTC
I have checked this issue with the help of test steps given in bug description and able to reproduce the reported behaviour. Please refer the screencast : http://www.screencast.com/t/BU8DNnFvOI

Application Output : https://gist.github.com/saurabh360/2345273be2a3c111b683
System Log : https://gist.github.com/saurabh360/4983faa6ac4bf2611857
Ide Logs : https://gist.github.com/saurabh360/694dc0739b799e87b89a

Environment info :

=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: 91997f85-0008-4b4c-9f53-c7f991fcdae3
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: 8.10.3.2 (Enterprise Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.3
Darwin Apples-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

Note You need to log in before you can comment on or make changes to this bug.