Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the rule of method declare in Obj-c? Could I use a method without declaration directly?

In Xcode4.4, I found I can use a method define in .m file directly without declaration in .h head file or .m file.

what's the rule of method declaration in Obj-c? Could I use a method without declaration in head file?

like image 754
user1300503 Avatar asked Sep 18 '12 11:09

user1300503


1 Answers

If you declare a method in the header file, then other classes will be able to access that method.

like image 57
Will Andrew Avatar answered Nov 15 '22 05:11

Will Andrew