Bug 21221 - UIScrollView appearance proxy is empty
Summary: UIScrollView appearance proxy is empty
Status: NEW
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.5
Hardware: PC Windows
: Normal enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-07-10 05:15 UTC by Nathan Randle
Modified: 2014-07-15 12:33 UTC (History)
3 users (show)

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

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 for Bug 21221 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Nathan Randle 2014-07-10 05:15:07 UTC
It doesn't appear to be possible to set UIScrollView appearance properties using UIScrollview.Appearance.

UIScrollViewAppearance inherits from UIViewAppearance without adding any scroll view sepcific properties.

In particular the indicator style is something I would like to set globally but am unable to without the appearance proxy implementation.
Comment 1 Sadik Ali 2014-07-10 10:32:08 UTC
I can reproduce the reported behavior. I am also not able to set the value of "UIScrollview.Appearance" property. 

I have checked the definition of "UIScrollview" class in assembly browser and I observed that the "Appearance" property only contain get accessor and doesn't contain set accessor. So it's only read only property. I have also checked the definition of "Appearance" property in "UIView" class and it's also not contain the set accessor.

Screencast: http://www.screencast.com/t/5AKO6by06

I’ll need confirmation from the developer if this is a bug. Leaving as NEW for now.
Comment 2 Nathan Randle 2014-07-10 11:49:10 UTC
No UIScrollView.Appearance should not be settable. 

It should return an appearance proxy which allows you to set global styles for controls. In this case the properties I'm interested in aren't present on the appearance proxy.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2014-07-15 12:33:50 UTC
It doesn't look like Apple documents any of the UIScrollView properties with UI_APPEARANCE_SELECTOR, so you'd be heading into undocumented territory here.

You can however probably work around it by manually calling the selector:

using MonoTouch.ObjCRuntime;

Messaging.objc_msgSend_int (uiScrollView.Appearance.Handle, Selector.GetHandle ("setIndicatorStyle:"), myIndicatorStyle);