@ Interface circle: NSOject
{
/ /
}
- (Void) .........
- (Void) .........
@ End
@ Implementation circle
- (Void) .....
.........
@ End
This case, what is the difference between writing methods declared in the interface method and the method is not declared directly in the @ implementation in?
Reply:
Not in @ interface and @ implementation distinction, but to see where the writing method is. H or. M.
Inside. H file is to be written by other classes in the method call (public), and. M is an internal method, I can not say absolutely not be arbitrary external calls, but write. M the intent is to Write a private method (private).
But also pay attention to the words of the variables in the @ interface which is a private variable declared in. H @ property is public, and. M @ property is private.
Reply:
understand, thank you.
Reply:
Proposed landlord to buy the book to see oc Yeah.
Reply:
Seeking to sub sprinkle
. There can also be problems mentioned ~Reply:
oc proposed landlord to buy the book to see the country.
Reply:
There are differences between private
Reply:
public private
Reply:
I have encountered this problem before
ahAfter reading the book come to understand
Reply:
When we refer to a class, you need to import its header file before you can use this class
# Import "myclass.h"
Therefore, the method is defined in the header file is available for access by external class (public)
No comments:
Post a Comment