iOS — “add” methods appearing for autosynthesized properties in codeSense

妖精的绣舞 提交于 2019-12-04 03:01:08

That are accessor methods that a class can implement to support Key-Value Coding for mutable to-many relationships, see Mutable Unordered Accessors in the "Key-Value Coding Programming Guide":

In order to be key-value coding complaint for a mutable unordered to-many relationship you must implement the following methods:

-add<Key>Object: or -add<Key>:. At least one of these methods must be implemented. These are analogous to the NSMutableSet method addObject:.

The same "strange" autocompletion happens for other Key-Value coding accessor methods, for example:

- (void)remove...
- (void)intersect...
- (NSUInteger)countOf...
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!