What does the text inside parentheses in @interface and @implementation directives mean?

后端 未结 2 952
难免孤独
难免孤独 2020-11-30 09:07

I\'ve got a very basic question about some sample code from Apple. In the .m file, the class declarations look like this:

@interface MyMovieViewController (O         


        
2条回答
  •  隐瞒了意图╮
    2020-11-30 09:10

    Those are "categories".

    With those you can extend any objective-C class by adding methods, which will apply to all the objects of the class.

    More detailed article here: http://macdevelopertips.com/objective-c/objective-c-categories.html

提交回复
热议问题