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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:36:58+00:00 2026-06-04T11:36:58+00:00

In the last verson ox xCode (4.3) I’ve seen that prefdefined templates (such us

  • 0

In the last verson ox xCode (4.3) I’ve seen that prefdefined templates (such us Master/Detail template) in which the interface declaration is made in the .m file. For example, in the file MyFile.h there is:

@interface MyFile

@property (nonatomic, retain) NSString *someProp;

@end

And in the MyFile.m file there is:

@implementation MyFile

@interface MyFile {
    NSString * anotherProp;
}

- (id) init...

Why it’s made on this way? Why the anotherProp isn’t declared into the MyFile.h file?

Thanks in advance

  • 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-04T11:37:00+00:00Added an answer on June 4, 2026 at 11:37 am

    Well its not declared this way but this way :-

    @interface ClassName() {
    
        Declarations;
    
    }
    
    Methods;
    
    @end
    

    These are called class extension.They are similar to categories but can be declared only in implementation of the class not in any other class.The use of extensions is to redeclare property that is public or readwrite , also declare newer ones , if needed.They simply allow you to declare properties and variables in places other than @interface so the name extensios.

    It was inrtoduced to tackle the problem with categories as they make the methods public and data hiding capability of classes is compensated but a class extension effectively extends the class’s primary interface which the declared methods have the same requirements as methods declared in the class’s oft public primary interface.

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

Sidebar

Related Questions

I have the last version of OCMock (1.55) and XCode 3.2.3. I have created
I made a program in Xcode, being a simple calculator that takes a first
I just updated Xcode to version 4.3 via the Mac App Store last week,
I use the last version of itextsharp. I use the property HeaderRows=1 so that
Last version or XCode (3.2.1) is running very slow on OS X 10.6. What
Clicking through to the download-page if see that the last version of the download
Just upgraded my xcode to the latest SDK which has the iOS 4.1 SDK.
I have simple static lib in xcode with the only class test.h: @interface TestClass
I updated the Npgsql driver to the last version (2.0.5) and got error in
I want to use the last version of rails, in my Gemfile: gem 'rails',

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.