Bug 14933 - NSStringDrawingOptions enum is out of sync with iOS documentation
Summary: NSStringDrawingOptions enum is out of sync with iOS documentation
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.0.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-09-23 14:07 UTC by Andrew
Modified: 2013-10-03 10:57 UTC (History)
2 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 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 Andrew 2013-09-23 14:07:54 UTC
DisableScreenFontSubstitution and OneShot members aren't documented in iOS documentation, may be they should be removed from the Monotouch enum?

// Type: MonoTouch.Foundation.NSStringDrawingOptions
// Assembly: monotouch, Version=, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
// MVID: FF22867E-2A98-4628-96C2-2D4118C53C76
// Assembly location: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v4.0\monotouch.dll

namespace MonoTouch.Foundation
  public enum NSStringDrawingOptions : uint
    UsesLineFragmentOrigin = 1U,
    UsesFontLeading = 2U,
    DisableScreenFontSubstitution = 4U,
    UsesDeviceMetrics = 8U,
    OneShot = 16U,
    TruncatesLastVisibleLine = 32U,


enum {
   NSStringDrawingTruncatesLastVisibleLine = 1 << 5,
   NSStringDrawingUsesLineFragmentOrigin = 1 << 0,
   NSStringDrawingUsesFontLeading = 1 << 1,
   NSStringDrawingUsesDeviceMetrics = 1 << 3,
typedef NSInteger NSStringDrawingOptions;
Comment 1 Sebastien Pouliot 2013-10-03 10:57:20 UTC
That enum is shared with Xamarin.Mac and there's more values available in OSX [1].

In many case we exclude values that don't exists in either (iOS or OSX) but once they are made public it's hard to remove them without possibly breaking apps (e.g. code sharing).

I've updated [2] our own documentation to state that those values are OSX specific (and not availble on iOS).

[1] https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Classes/NSString_AppKitAdditions/Reference/Reference.html

[2] 5a3d3c09ea6f3befbb9f78af0319d4f4c740d8dc