isEqual doesn't always work for NSIndexPath? What can I use in its place?

天大地大妈咪最大 提交于 2019-12-02 20:12:44
Sven

As of iOS 5 you can just use isEqual: (see comments)


Try [indexPath1 compare: indexPath2] == NSOrderedSame.

Maybe you found a bug in NSIndexPath. If you try to create a new NSIndexPath with a path that already exists you should get that one instead. So isEqual: probably just compares the pointers and not the actual indices stored.

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