In Objective-C, what's difference between import in header file and implementation file?

Zedd

I'm fresh to learn Objective-C. Header file is most like a public interface and Implementation file has private interface.

But I'm confused by choosing where to import another header file.

CRD

But I'm so confused by choosing where to import.

If, and only if, what you are importing is required by the public interface, e.g. an imported type is used in the signature of a public method, then import in the interface file.

If what you are importing is only required internally by the implementation then import in the implementation file.

The above is a general principle, not tied or limited to Objective-C.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

In objective-c what is the difference between creating a class in the same .h file by writing, and creating a new file as Objective-c class?

From Dev

How to import objective c header file in swift project

From Dev

How to import objective c header file in swift project

From Dev

what's the right order between system header and user header file in C/C++ source?

From Dev

What's the difference between a tracked and a staged file?

From Dev

What's the difference between a binary file and a library?

From Dev

What is the difference between import a large csv file into SAS by code and by mouse?

From Dev

Objective c - import .m and .h file - what does it do

From Dev

What's the difference between a content header and a header?

From Dev

What is the difference between including a .c file and a .h file

From Dev

What is the difference between using an address of a FILE variable and a FILE * in C?

From Dev

How would I write a header and implementation file for FizzBuzz in Objective-C?

From Dev

What is the difference between .a and .so file?

From Dev

C++ ifstream, ofstream: What's the difference between raw read()/write() calls and opening file in binary mode?

From Dev

What are difference between *a and **a in objective-c object?

From Java

What's the difference between implementation and compile in Gradle?

From Dev

What's the difference between these two implementation?

From Dev

what's the difference between `[github]` and `[github "user"]` in a gitconfig file?

From Dev

Git permission what's the difference between file permission and special ACLs

From Dev

What's the difference between using a script tag to call a file and ajax?

From Java

What's the difference between a Resource, URI, URL, Path and File in Java?

From Dev

What's the difference between DWARF and DWARF with dSYM file?

From Dev

what's the difference between running a exit command inside a file and a terminal

From Dev

What's the difference between a torrent file and a Magnet link?

From Dev

What's the difference between the "group" and "group-" file?

From Dev

What's the difference between ioremap and file operation mmap?

From Dev

Git permission what's the difference between file permission and special ACLs

From Dev

What's the difference between dd into a file and dd into a physical disk

From Dev

JAR Manifest file - Difference between Specification and Implementation

Related Related

  1. 1

    In objective-c what is the difference between creating a class in the same .h file by writing, and creating a new file as Objective-c class?

  2. 2

    How to import objective c header file in swift project

  3. 3

    How to import objective c header file in swift project

  4. 4

    what's the right order between system header and user header file in C/C++ source?

  5. 5

    What's the difference between a tracked and a staged file?

  6. 6

    What's the difference between a binary file and a library?

  7. 7

    What is the difference between import a large csv file into SAS by code and by mouse?

  8. 8

    Objective c - import .m and .h file - what does it do

  9. 9

    What's the difference between a content header and a header?

  10. 10

    What is the difference between including a .c file and a .h file

  11. 11

    What is the difference between using an address of a FILE variable and a FILE * in C?

  12. 12

    How would I write a header and implementation file for FizzBuzz in Objective-C?

  13. 13

    What is the difference between .a and .so file?

  14. 14

    C++ ifstream, ofstream: What's the difference between raw read()/write() calls and opening file in binary mode?

  15. 15

    What are difference between *a and **a in objective-c object?

  16. 16

    What's the difference between implementation and compile in Gradle?

  17. 17

    What's the difference between these two implementation?

  18. 18

    what's the difference between `[github]` and `[github "user"]` in a gitconfig file?

  19. 19

    Git permission what's the difference between file permission and special ACLs

  20. 20

    What's the difference between using a script tag to call a file and ajax?

  21. 21

    What's the difference between a Resource, URI, URL, Path and File in Java?

  22. 22

    What's the difference between DWARF and DWARF with dSYM file?

  23. 23

    what's the difference between running a exit command inside a file and a terminal

  24. 24

    What's the difference between a torrent file and a Magnet link?

  25. 25

    What's the difference between the "group" and "group-" file?

  26. 26

    What's the difference between ioremap and file operation mmap?

  27. 27

    Git permission what's the difference between file permission and special ACLs

  28. 28

    What's the difference between dd into a file and dd into a physical disk

  29. 29

    JAR Manifest file - Difference between Specification and Implementation

HotTag

Archive