在方法名称中使用“From”或“With”是否意味着什么?
[NSIndexPath indexPathForItem:item inSection:section];
[NSIndexPath indexPathWithIndex:index];
如果是这样,我会猜测“With”保留和“From”没有,但我从未听过有关此事的讨论。
如果没有,为什么方法的命名方式有所不同?如果他们都有“With”或两者都有“From”
,那么这意味着什么呢?答案 0 :(得分:0)
它没有任何意义,只是有助于使方法更具可读性和人性化。