iOS Reference Library Apple Developer
Search

CAScrollLayer Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/QuartzCore.framework
Availability
Available in iOS 2.0 and later.
Declared in
CAScrollLayer.h
Companion guides

Overview

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.

Tasks

Scrolling Constraints

Scrolling the Layer

Properties

For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.

scrollMode

Defines the axes in which the layer may be scrolled.

@property(copy) NSString *scrollMode

Discussion

The possible values are described in “Scroll Modes”. The default is kCAScrollBoth.

Availability
  • Available in iOS 2.0 and later.
Declared In
CAScrollLayer.h

Instance Methods

scrollToPoint:

Changes the origin of the receiver to the specified point.

- (void)scrollToPoint:(CGPoint)thePoint

Parameters
thePoint

The new origin.

Availability
  • Available in iOS 2.0 and later.
Declared In
CAScrollLayer.h

scrollToRect:

Scroll the contents of the receiver to ensure that the rectangle is visible.

- (void)scrollToRect:(CGRect)theRect

Parameters
theRect

The rectangle that should be visible.

Availability
  • Available in iOS 2.0 and later.
Declared In
CAScrollLayer.h

Constants

Scroll Modes

These constants describe the supported scroll modes used by the scrollMode property.

NSString * const kCAScrollNone;
NSString * const kCAScrollVertically;
NSString * const kCAScrollHorizontally;
NSString * const kCAScrollBoth;
Constants
kCAScrollNone

The receiver is unable to scroll.

Available in iOS 2.0 and later.

Declared in CAScrollLayer.h.

kCAScrollVertically

The receiver is able to scroll vertically.

Available in iOS 2.0 and later.

Declared in CAScrollLayer.h.

kCAScrollHorizontally

The receiver is able to scroll horizontally.

Available in iOS 2.0 and later.

Declared in CAScrollLayer.h.

kCAScrollBoth

The receiver is able to scroll both horizontally and vertically.

Available in iOS 2.0 and later.

Declared in CAScrollLayer.h.

Declared In
CAScrollLayer.h



Last updated: 2007-07-24

Did this document help you? Yes It's good, but... Not helpful...