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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:33:20+00:00 2026-05-28T01:33:20+00:00

In the following example, is the line NSObject *_propertyName; required? .h @interface ClassName {

  • 0

In the following example, is the line NSObject *_propertyName; required?

.h

@interface  ClassName
{
    NSObject *_propertyName;
}

@property (nonatomic, retain) NSObject *propertyName;

@end

.m

@implementation  ClassName

@synthesize propertyName = _propertyName;

@end

I find that if I exclude NSObject *_propertyName; but keep @synthesize propertyName = _propertyName; everything works. Here’s an example of what I’m talking about:

.h

@interface  ClassName

@property (nonatomic, retain) NSObject *propertyName;

@end

.m

@implementation  ClassName

@synthesize propertyName = _propertyName;

@end

I’ve tested and seen that the property still works. I nearly always see code that includes the line NSObject *_propertyName;. Is there something I’m missing here?

  • 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-05-28T01:33:21+00:00Added an answer on May 28, 2026 at 1:33 am

    You’re not missing anything. Starting with the newer runtimes (newer iOS Simulator, x86_64 and ARM) you no longer need to manually declare an ivar. Prior to that on i386 and PPC you had to manually declare your ivars.

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

Sidebar

Related Questions

Given the URL (single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using
I have the following example class: Test.h: @interface Test : UIButton { NSString *value;
I have the following example where when a user clicks a navigation line it
When creating a multi-file unified diff is Index line required like in the following
Look at the line THIS LINE #### in following example. <ListBox Grid.Row=0 x:Name=listBoxServers> <ListBoxItem
In the following example the compiler complains on the line: handler.handle(info); with the error:
I have the following example paragraph: The following is my text. My introductory line
Consider the following example: <Grid HorizontalAlignment=Stretch VerticalAlignment=Top> <Line Stroke=Red X1=0 X2=100 Y1=50 Y2=50/> <Line
A book as the following example and explains that you won't see the line
I was following example 2 in Running a Zend Framework action from command line

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.