
NSIndexPath和TableViews
@interfaceNSIndexPath (UITableView) {
}
+(NSIndexPath*)indexPathForRow:(NSUInteger)row inSection:(NSUInteger)section;
@property(nonatomic,readonly)NSUIntegerrow;
@property(nonatomic,readonly)NSUIntegersection;
@end
Indicates the depth-first traversal order of the receiving index path and another index path.
Parameters
-
indexPath
-
Index path to compare.
This value must not be
nil. If the value isnil, the behavior is undefined.
Return Value
The depth-first traversal ordering of the receiving index path and indexPath.
-
NSOrderedAscending: The receiving index path comes before indexPath. -
NSOrderedDescending: The receiving index path comes after indexPath. -
NSOrderedSame: The receiving index path and indexPath are the same index path.
Availability
- Available in Mac OS X v10.4 and later.
Declared In
NSIndexPath.h
本文详细介绍了Foundation框架中的NSIndexPath类,它是用于表示从0开始的嵌套集合阵列树状结构中的特定节点路径。文章还讲解了NSIndexPath如何被UITableView所利用来表示特定章节中的特定行,并提供了NSIndexPath的比较方法说明。
1059

被折叠的 条评论
为什么被折叠?



