Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The NSFullSizeContentViewWindowMask styleMask (OS X 10.10) prevents text drawing #167

Closed
eskroch opened this issue Apr 7, 2015 · 1 comment

Comments

@eskroch
Copy link
Member

eskroch commented Apr 7, 2015

On OS X 10.10, the NSFullSizeContentViewWindowMask window styleMask prevents text layers (and possibly others) from drawing their contents. From NSWindow.h:

/* If set, the contentView will consume the full size of the window; it can be combined with other window style masks, but is only respected for windows with a titlebar.
    Utilizing this mask opts-in to layer-backing. Utilize the contentLayoutRect or auto-layout contentLayoutGuide to layout views underneath the titlebar/toolbar area.
 */
    NSFullSizeContentViewWindowMask NS_ENUM_AVAILABLE_MAC(10_10) = 1 << 15

Core Plot requires a layer hosting view. Update Core Plot to work with hosting views and layer-backed views.

See this discussion thread for further discussion.

@grng
Copy link

grng commented Aug 2, 2015

Created this description for a separate issue but then found this one. :)


All the plot labels are not drawn on the initial app load when I'm using NSVisualEffectView in the view hierarchy.

When I'm setting up the whole plot in awakeFromNib, viewDidLoad or first viewWillAppear calls, there're no labels on my app start. But setup in viewDidAppear always works.

If I go into another tab of my app and then return back, then labels appear when I re-setup a plot in viewWillAppear call.

There're no issues for any other screens, the bug happens only on the first screen that's visible immediately after the app's launch.

I wasn't able to reproduce it in a test project, sorry. It works for a small OS X app without issues.

But the main ideas are:

  • plot appears as soon as app's window initially loaded
  • plot is created in awakeFromNib, viewDidLoad or first viewWillAppear
  • plot is inside NSVisualEffectView hierarchy that uses NSFullSizeContentViewWindowMask

Workaround: use viewWillAppear if possible.

eskroch added a commit that referenced this issue Aug 16, 2015
…osting view or a layer backed view as required. Fixed issue #167.
@eskroch eskroch closed this as completed Aug 16, 2015
shinjukunian pushed a commit to shinjukunian/core-plot that referenced this issue Oct 1, 2015
* commit '97431f16af5fbf1fe9b5d75f89188839ad05b3f2': (67 commits)
  Added missing break statements in -debugQuickLookObject.
  Added unit tests for the log modulus axis scale and related calculations.
  Added the log modulus scale type to the plot space demo in the Plot Gallery app.
  Fixed some problems with axis labeling and plot space conversions for the log modulus axis scale.
  Added documentation for the CPTEdgeInsets functions.
  Standardized code formatting.
  Added Demitri Muna to the license file.
  Initial implementation of new CPTScaleType, CPTScaleTypeLogModulus.
  Changed the Mac CPTGraphHostingView so it can act as either a layer hosting view or a layer backed view as required. Fixed issue core-plot#167.
  Updated .xib files in the example apps to the latest file format and deployment target.
  Removed the unused CPTGetCurrentContext() function. Fixed issue core-plot#216.
  Fixed a compiler warning in iOS builds. Fixed issue core-plot#215.
  Added a -debugQuickLookObject() method to many Core Plot classes for debugging and Swift playground support.
  Fixed a file reference in the StockPlot example app.
  Embed the Core Plot framework in the Plot Gallery app to fix device builds.
  Added code signing identities for the iOS framework.
  Fixed Xcode warnings for the launch images in the StockPlot example app.
  Renamed the iOS framework to "CorePlot" to match the Mac framework.
  Updated project files with Xcode 7 settings.
  Added an @3x image to the stretchable blue rectangle image in the Plot Gallery example app.
  ...

Conflicts:
	framework/CorePlot-CocoaTouch.xcodeproj/project.pbxproj
	framework/CorePlot.xcodeproj/project.pbxproj
	framework/Source/CPTXYPlotSpace.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants