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 122467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:07:59+00:00 2026-05-11T04:07:59+00:00

In Cocoa, specifically the iPhone SDK, the opaque property is described as: If opaque,

  • 0

In Cocoa, specifically the iPhone SDK, the opaque property is described as:

If opaque, the drawing operation assumes that the view fills its bounds and can draw more efficiently. The results are unpredictable if opaque and the view doesn’t fill its bounds. Set this property to NO if the view is fully or partially transparent.

In my experience, if you have a view (label, table cell, etc.) with backgroundColor set to [UIColor clearColor], you do not need to set opaque to NO for it to appear properly (with a clear background).

Intuitively, doing this would require also setting opaque to NO, but I’ve never run into problems.

Can you mix opaque=YES and clearColor, or am I living on borrowed time? It doesn’t seem to be specifically documented anywhere.

  • 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. 2026-05-11T04:08:00+00:00Added an answer on May 11, 2026 at 4:08 am

    Try it and see is the only way forward on the iPhone, because like you say, despite the volume of the documentation that ships with the SDK, it’s not very specific in many cases.

    As for opaque though, this is just a hint to the compositing engine that tells it it doesn’t need to bother to displaying any layers that are covered by the opaque layer. However, the compositing is done by the graphics chip on the phone, so in many cases it is not more efficient to not draw the obscured part of a partially obscured layer, which is most likely why you are not seeing things get messed up at the moment (i.e. cocoa is ignoring the setting in the cases you’ve tried). By the same token you are not seeing a performance improvement from setting opaque to true.

    So my advice would be to stick with using the opaque property the way the docs say because you are risking a buggy rendering for no real benefit.

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

Sidebar

Related Questions

Are there any generally-accepted coding standards (naming, casting etc) that apply specifically to iPhone/Cocoa/Objective-C?
I'm learning Cocoa/Objective-C/iPhone SDK, and as a simple project to apply what I've learned,
Cocoa newbie here. I am working on an iPhone UITableViewController-based widget that can be
Specifically, what am I supposed to do with the view that is now hidden
In Cocoa/Touch, CAMediaTimingFunction represents four control points that specify a cubic bezier curve of
Hi Im looking for examples of well written Cocoa Touch iPhone apps to help
I was trying to follow the Table View Programming Guide for iPhone OS but
Is there an IDE which specifically supports Objective-C and has linked with Cocoa Touch
I have a cocoa app that allows the user to enter a query. I'm
Objective-C, or Cocoa specifically, supports variadic arguments, like for example class the method on

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.