CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
UIScrollBar Class Reference

A scroll bar for use with scroll view objects. More...

#import <UIScrollBar.h>

List of all members.

Public Member Functions

(id) - init [implementation]
 Initializes the internal variables of the object.
(id) - initWithCoder: [implementation]
 Initializes the object using the data in a given unarchiver.
(id) - initWithFrame: [implementation]
 Initializes the object with the specified frame rectangle and default display settings.
(void) - scrollViewDidScroll: [implementation]
 Automatically updates the location of the thumb when the scroll view is scrolled.
(void) - setDirection: [implementation]
 Sets the direction of the scroll bar.
(void) - setTransform: [implementation]
 Sets the transformation of the scroll bar.
(void) - thumbDidMove:event: [implementation]
 Automatically updates the offset of the delegate when the thumb is moved.
(void) - thumbWasRelocated: [implementation]
 Automatically moves the thumb to where the user touched the scrollbar, and updates the offset of the delegate based on its new location.

Protected Attributes

CGAffineTransform rotate

Properties

UIScrollView * delegate
 The delegate of the scroll bar object.
float direction
 The direction of the scroll bar.
CGAffineTransform transform
 Specifies the transform applied to the receiver, relative to the center of its bounds.

Detailed Description

A scroll bar for use with scroll view objects.

UIScrollBar is a concrete implementation of UIScrollViewDelegate that provides scroll bar functionality to scroll views. The delegates of both UIScrollBar and its respective UIScrollView must point to each other for the scroll bar to work.

Vertical scroll bars can be implemented by setting the direction property as M_PI_2. Scroll bars that increment in an opposite direction to the offset can be implemented with values of M_PI and -M_PI_2, though I have no idea why anyone would want to.

Created by Lari O Rasku, tkol on 5/25/11. Copyright 2011 __MyCompanyName__. All rights reserved.

Definition at line 11 of file UIScrollBar.h.


Member Function Documentation

- (id) init [implementation]

Initializes the internal variables of the object.

Do not use this method to initialize new instances of the object. It only encapsulates common initialization code and does not call any superclass constructors. Use initWithFrame instead.

Returns:
The initialized object.

Definition at line 75 of file UIScrollBar.m.

Here is the caller graph for this function:

- (id) initWithCoder: (NSCoder *)  aDecoder [implementation]

Initializes the object using the data in a given unarchiver.

This method is used to provide compatibility with xib files. Do not call it programmatically.

Parameters:
aDecoderAn unarchiver object.
Returns:
The initialized object, or nil if the object couldn't be created.

Definition at line 90 of file UIScrollBar.m.

References init.

Here is the call graph for this function:

- (id) initWithFrame: (CGRect)  frame [implementation]

Initializes the object with the specified frame rectangle and default display settings.

Parameters:
frameThe frame rectangle for the view, measured in points.
Returns:
The initialized object, or nil if the object couldn't be created.

Definition at line 104 of file UIScrollBar.m.

References init.

Here is the call graph for this function:

- (void) scrollViewDidScroll: (UIScrollView *)  scrollView [implementation]

Automatically updates the location of the thumb when the scroll view is scrolled.

Definition at line 154 of file UIScrollBar.m.

- (void) setDirection: (float)  value [implementation]

Sets the direction of the scroll bar.

Parameters:
valueThe counter-clockwise angle, in radians, towards which the scroll bar increments. Only multiples of M_PI_2 are supported.

Definition at line 28 of file UIScrollBar.m.

References rotate, and transform.

- (void) setTransform: (CGAffineTransform)  value [implementation]

Sets the transformation of the scroll bar.

This method does not override the rotation applied by the direction property.

Parameters:
valueAn affine transformation matrix.

Definition at line 51 of file UIScrollBar.m.

References rotate, and transform.

- (void) thumbDidMove: (id)  sender
event: (id)  event 
[implementation]

Automatically updates the offset of the delegate when the thumb is moved.

Definition at line 136 of file UIScrollBar.m.

References delegate, and direction.

- (void) thumbWasRelocated: (UIGestureRecognizer *)  gestureRecognizer [implementation]

Automatically moves the thumb to where the user touched the scrollbar, and updates the offset of the delegate based on its new location.

Definition at line 114 of file UIScrollBar.m.

References delegate, and direction.


Member Data Documentation

- (CGAffineTransform) rotate [protected]

Definition at line 12 of file UIScrollBar.h.


Property Documentation

- (UIScrollView *) delegate [read, write, assign]

The delegate of the scroll bar object.

Definition at line 14 of file UIScrollBar.h.

- (float) direction [read, write, assign]

The direction of the scroll bar.

Only multiples of M_PI_2 are allowed.

Returns:
The counter-clockwise angle (in radians) of the scroll bar.

Definition at line 21 of file UIScrollBar.h.

- (CGAffineTransform) transform [read, write, assign]

Specifies the transform applied to the receiver, relative to the center of its bounds.

The transformation of the scroll bar.

Overridden to separate rotation logic from user-defined transformations.

Returns:
The affine transformation matrix of the scroll bar, not including the rotation applied by the direction property.

Definition at line 13 of file UIScrollBar.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines