Does Objective-C have an equivalent to java annotations?

前端 未结 8 1081
后悔当初
后悔当初 2020-12-28 09:10

Does Objective-C have an equivalent to java annotations?

What\'s I\'m trying to do is create a property and be able to somehow access some metadata about it.

8条回答
  •  失恋的感觉
    2020-12-28 09:55

    There is no native support of this functionality, but you may to take a look at following solution — https://github.com/epam/lib-obj-c-attr/ It is compile time implementation of attributes. Definition of attributes based on defines but not on comments as in other solutions like ObjectiveCAnnotate.

提交回复
热议问题