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

  • SEARCH
  • Home
  • 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 7905435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:28:26+00:00 2026-06-03T10:28:26+00:00

According to the Apple UIView Programming Guide, you can only change a uiview’s CA

  • 0

According to the Apple UIView Programming Guide, you can only change a uiview’s CA layer using the layerClass method, which you must override to return a different class during the view’s initialization, and that this is the only way this can be done:

The type of layer associated with a view cannot be changed after the view is created. Therefore, each view uses the layerClass class method to specify the class of its layer object.

However, I’ve seen app tutorials that directly assign the view’s layer to another created layer, and I always assumed this was essentially replacing the layer with another layer class and worked fine.

Are these two methods going to yield the same results? Is it bad to use the second method?

  • 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-03T10:28:27+00:00Added an answer on June 3, 2026 at 10:28 am

    The layer property of UIView is read-only. You cannot assign to it. I suspect you were looking at a Mac OS X tutorial, not an iOS tutorial. On Mac OS X, you use NSView, which has a read-write layer property.

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

Sidebar

Related Questions

According to C++03 Standard (23.1/3) only copy-constructible class objects can be stored in STL
according to the CUDA programming guide, the value returned by the texture fetch is
According to Apple's docs, Subclasses need not override -[UIView drawRect:] if the subclass is
I have MAC OS 10.6 (Snow Leopard) and according to Apple's guide on HTTP
According to Apple's guide line, an iPhone app's launch image/splash screen should be a
According to Apple's Objective C guide, methods with the same name all use the
According to Apple Docs NSCalendar is not thread-safe . How can I ensure thread-safety
I am using NSInvocationOperation with NSOperationQueue developing in iOS5. According to apple documentation on
I am using UITableViewCellAccessoryDisclosureIndicator as accessoryType of my UITableViewCell . According to Apple's documentation,
According to Apple if one doesn't create an object using alloc or new then

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.