Bug 2443 - [Export("fadeDuration")] no longer works for CATiledLayer
Summary: [Export("fadeDuration")] no longer works for CATiledLayer
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2011-12-09 16:07 UTC by James Clancey
Modified: 2011-12-14 19:03 UTC (History)
3 users (show)

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

TestCase (8.00 KB, application/zip)
2011-12-09 16:07 UTC, James Clancey
Workaround using objc library (87.62 KB, application/zip)
2011-12-09 19:45 UTC, Ronald Adonyo

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description James Clancey 2011-12-09 16:07:40 UTC
Created attachment 1026 [details]

Using the attached test case, you will see the fade duration on the CATiledLayer is ignored.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-12-09 19:13:00 UTC
Exactly what is the expected behavior? Everything completely green?
Comment 2 James Clancey 2011-12-09 19:14:03 UTC
You should never see green. You notice how it fades from green to white. Since the fade is set to 0 it should just show white.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2011-12-09 19:15:08 UTC
If I put the Export on the getter:

public static double FadeDuration {
    get {
        return 0;

the property is called at least (but everything is green).
Comment 4 Ronald Adonyo 2011-12-09 19:44:42 UTC
It should show green then fade to white like James says.
Please take a look at my attached project for my workaround.
Comment 5 Ronald Adonyo 2011-12-09 19:45:44 UTC
Created attachment 1028 [details]
Workaround using objc library
Comment 6 Rolf Bjarne Kvinge [MSFT] 2011-12-09 20:35:40 UTC
There are two issues here:
1) The export only works if it's on the getter, not on the property itself (not sure if it's supposed to be like this yet).
2) There is a bug in the x86 bridge between managed and objc code causing a static method returning double or float to return random values. 

This means that if you fix 1) the app will work on device (but not in the simulator).

You can fix 1) yourself, but 2) will require a MonoTouch update. I'll do some more testing and fix 2) next week.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2011-12-14 17:22:39 UTC
2) has now been fixed (d20df146). It will be included in the next beta (5.1.2).
Comment 8 Rolf Bjarne Kvinge [MSFT] 2011-12-14 19:03:04 UTC
1) has also been fixed now (1d81c56c) - you should be able to put Export attributes on static properties. It will be included in the next beta.