NSIndexPath(PSPDFDocumentViewLayout)
Objective-C
@interface NSIndexPath (PSPDFDocumentViewLayout)
/// Creates an index path with a given spread index, suitable for use on all the collection
/// view methods dealing with index paths instead of spread indexes.
///
/// @param spreadIndex The spread index to express as an index path.
/// @return The index path expressing the passed in spread index.
+ (NSIndexPath *)pspdf_indexPathForSpreadAtIndex:(NSInteger)spreadIndex;
/// The index identifying the spread in a `PSPDFDocumentViewLayout`.
@property (nonatomic, readonly) NSInteger pspdf_spreadIndex;
@end
Undocumented
-
Creates an index path with a given spread index, suitable for use on all the collection view methods dealing with index paths instead of spread indexes.
Declaration
Objective-C
+ (nonnull NSIndexPath *)pspdf_indexPathForSpreadAtIndex:(NSInteger)spreadIndex;
Swift
class func pspdf_indexPathForSpread(at spreadIndex: Int) -> IndexPath
Parameters
spreadIndex
The spread index to express as an index path.
Return Value
The index path expressing the passed in spread index.
-
The index identifying the spread in a
PSPDFDocumentViewLayout
.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger pspdf_spreadIndex;
Swift
var pspdf_spreadIndex: Int { get }