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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:36:17+00:00 2026-06-14T11:36:17+00:00

My question is, that I would know how to use 2 .m files for

  • 0

My question is, that I would know how to use 2 .m files for one objectclass also for one header (.h)

I have a big method with 20000+ lines and I would, that this method stand alone in a .m file and the other methods in the other .m file. I have done it, but I get errors, that the methods aren not in the one .m file. I get a link error, but i can remove the link error if i delete the second .m file.

Is it possible to create 2 .m files for one header ?

If yes pleas tell me how?

  • 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-14T11:36:18+00:00Added an answer on June 14, 2026 at 11:36 am

    You have several approaches:

    1. you could split your methods into 2 different categories:

      //-- MyClass1.m
      @implementation MyClass (part1)
      
      @end
      
      //-- MyClass2.m
      @implementation MyClass (part2)
      
      @end
      

      I defined 2 categories for symmetry reason; of course you also need a “base” @implementation of your class (i.e., without the category specifier); you can choose whether you define a “base” and and extension category, or “base” and two categories, etc…

    2. or you might try including the second .m file inside of the first one:

          //-- MyClass1.m
          @implementation MyClass
      
          <first part>
      
          #include "MyClass2.m"
      
          @end
      

    Both should work.

    Let alone the possibility of refactoring your class, which would be the best option.

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

Sidebar

Related Questions

What I'm trying to do: I have two files: One is the header.php which
I have a python question, but i think any programer would know enough to
Ok, I have a question that I know is very opinionated (based on all
I found this question that is discussing what I would like to do, but
Warning: Note that this is a dumb question of something that I would probably
Edit: Appended or LDAP to question title to indicate that I would be fine
First off I would like to say that I think that my question may
Before I ask this question I would to apologise because of the fact that
Question: What are some good libraries that've been written in VB.NET? The best would
In this question , it was suggested that calling repr on a dictionary would

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.