CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
A scroll bar for use with scroll view objects. More...
#import <UIScrollBar.h>
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. |
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.
- (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.
Definition at line 75 of file UIScrollBar.m.
- (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.
aDecoder | An unarchiver object. |
Definition at line 90 of file UIScrollBar.m.
References init.
- (id) initWithFrame: | (CGRect) | frame | [implementation] |
Initializes the object with the specified frame rectangle and default display settings.
frame | The frame rectangle for the view, measured in points. |
Definition at line 104 of file UIScrollBar.m.
References init.
- (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.
value | The 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.
- (void) setTransform: | (CGAffineTransform) | value | [implementation] |
Sets the transformation of the scroll bar.
This method does not override the rotation applied by the direction property.
value | An affine transformation matrix. |
Definition at line 51 of file UIScrollBar.m.
- (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.
- (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.
- (CGAffineTransform) rotate [protected] |
Definition at line 12 of file UIScrollBar.h.
- (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.
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.
Definition at line 13 of file UIScrollBar.h.