Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/QuartzCore.framework |
Availability | Available in Mac OS X v10.5 and later. |
Declared in | CAScrollLayer.h |
Companion guides | |
Related sample code |
The CAScrollLayer
class is a subclass of CALayer
that simplifies displaying a portion of a layer. The extent of the scrollable area of the CAScrollLayer
is defined by the layout of its sublayers. The visible portion of the layer content is set by specifying the origin as a point or a rectangular area of the contents to be displayed. CAScrollLayer
does not provide keyboard or mouse event-handling, nor does it provide visible scrollers.
scrollMode
property
For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.
Defines the axes in which the layer may be scrolled.
@property(copy) NSString *scrollMode
The possible values are described in “Scroll Modes”
. The default is kCAScrollBoth
.
CAScrollLayer.h
Changes the origin of the receiver to the specified point.
- (void)scrollToPoint:(CGPoint)thePoint
The new origin.
CAScrollLayer.h
Scroll the contents of the receiver to ensure that the rectangle is visible.
- (void)scrollToRect:(CGRect)theRect
The rectangle that should be visible.
CAScrollLayer.h
These constants describe the supported scroll modes used by the scrollMode property.
NSString * const kCAScrollNone; NSString * const kCAScrollVertically; NSString * const kCAScrollHorizontally; NSString * const kCAScrollBoth;
kCAScrollNone
The receiver is unable to scroll.
Available in Mac OS X v10.5 and later.
Declared in CAScrollLayer.h
.
kCAScrollVertically
The receiver is able to scroll vertically.
Available in Mac OS X v10.5 and later.
Declared in CAScrollLayer.h
.
kCAScrollHorizontally
The receiver is able to scroll horizontally.
Available in Mac OS X v10.5 and later.
Declared in CAScrollLayer.h
.
kCAScrollBoth
The receiver is able to scroll both horizontally and vertically.
Available in Mac OS X v10.5 and later.
Declared in CAScrollLayer.h
.
CAScrollLayer.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-07-24)