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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:07:31+00:00 2026-06-04T07:07:31+00:00

I have some code that sets a border around a UITextView. It builds correctly

  • 0

I have some code that sets a border around a UITextView. It builds correctly in one class; when I take that code and copy it to another class (changing the object name), it no longer builds, saying “Property ‘borderWidth’ cannot be found in forward class object ‘CALayer *'” (the same message for the other two lines of code). I have done a clean, re-build and nothing helps. Why is this happening? and how do I fix it?

- (void)viewDidLoad  {
[super viewDidLoad];

//--  draw box around notes field
orderNotes.layer.borderWidth = 1.0f;
orderNotes.layer.borderColor = [[UIColor blackColor] CGColor];
orderNotes.layer.cornerRadius = 4; 

}

Object “orderNotes” is defined as UITextView. There are no other errors.

  • 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-04T07:07:32+00:00Added an answer on June 4, 2026 at 7:07 am

    You need to:

    #import <QuartzCore/QuartzCore.h>
    

    Otherwise, the layer property is not visible to you.

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

Sidebar

Related Questions

I have some code that sets up a dictionary with some defualt values for
I have some code that sets the lang var to the site default language.
I have some setup code in my functions.php file that sets permalinks and adds
I have code in global.asax that sets some things in cache with CacheItemRemovedCallback. When
I have some java code that gets and sets a session attribute: Object obj
I have some code in +initialize method of a class that I'd like to
I have some code that I borrowed from a long while ago that sets
I currently have some code that sets up notifications of connected USB HID devices
Ok I have some code that boils down to a pattern like this class
I have some JavaScript code that creates some div elements and it sets their

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.