NSIndexSet上的快速枚举 [英] Fast enumeration on an NSIndexSet

查看:92
本文介绍了NSIndexSet上的快速枚举的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以快速枚举 NSIndexSet 吗?

推荐答案

快速枚举必须产生对象;因为NSIndexSet包含标量数字( NSUInteger s),而不是对象,不能,不能快速枚举索引集。

Fast enumeration must yield objects; since an NSIndexSet contains scalar numbers (NSUIntegers), not objects, no, you cannot fast-enumerate an index set.

假设上,它可以把它们封装成NSNumbers,但后来它不会很快。

Hypothetically, it could box them up into NSNumbers, but then it wouldn't be very fast.

这篇关于NSIndexSet上的快速枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆