Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:06:49+00:00 2026-06-13T21:06:49+00:00

I have a NSWindow where I set opaque attribute to NO . The problem

  • 0

I have a NSWindow where I set opaque attribute to NO. The problem is that when I put any view inside that window it’s corners has blank pixels.

Everything works well when opaque attribue is left with YES value, however, window’s corners are not rounded anymore. See picture:

I’ve created repository with simple example project at bitbucket: https://bitbucket.org/lukaszb/animationartifacts

Is there a way I can fix this (remain window’s corners rounded and blank pixels not appearing)? Or should I try another solution (without setOapque:NO at NSWindow subclass)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:06:51+00:00Added an answer on June 13, 2026 at 9:06 pm

    Try enabling the Core Animation layer for your RoundedView, i.e., open MainMenu.xib, select RoundedView and in the “View Effects” tab (rightmost one) check the view under “Core Animation Layer”.

    Alternatively you can do it programmatically, e.g., in RoundedView add:

    - (void)awakeFromNib {
        self.wantsLayer = YES;
        self.layer = [CALayer layer];
        self.layer.backgroundColor = [[NSColor blackColor] CGColor];
        self.layer.cornerRadius = RADIUS;
    }
    

    Also #import <QuartzCore/QuartzCore.h> and add QuartzCore.framework to the project. You can then delete the drawRect method since CALayer already does rounded corners for you. (Actually you can delete your whole RoundedView class if you just set up this layer for a regular NSView that you use in its place.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

lets say I have an NSWindow Class, that has several events for mouse and
In my application, I have a NSWindow that has a NSTableView object and a
I have an NSWindow set up in Interface Builder. I have set the class
I have a NSWindow that hosts a WebView that Ive hooked up to a
I have a NIB with two NSWindow objects. The controller class has two IBOutlets,
I have a document-based application with a view controller that contains a table, array
I have an NSWindow that shows up when you click either of two items
So right now I have an NSWindow that draws itself like an NSToolbar using
I have a window (NSWindow) with a series of views on it. One of
I have an NSWindow containing and NSImageView. I want that the user can drag

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.