CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
A view object for displaying musical scores. More...
#import <UIScoreView.h>
Public Member Functions | |
(void) | - dealloc [implementation] |
(BOOL) | - gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: [implementation] |
Dummy method to allow for other gesture recognizers beside the scrollbar-toggling one. | |
(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. | |
(BOOL) | - setScore: |
Sets a score to be shown by the score view. | |
(void) | - showScrollBar: |
Shows or hides the scroll bar with a sliding animation. | |
(void) | - tapGesture: [implementation] |
Handler for tap gestures. | |
Protected Attributes | |
UIDocumentView * | documentView |
UIScrollBar * | scrollBar |
Properties | |
IBOutlet UIDocumentView * | documentView |
A document view object for displaying the score. | |
IBOutlet UIScrollBar * | scrollBar |
A vertical scroll bar for ease of scrolling. |
A view object for displaying musical scores.
Technically, UIScoreView only provides an enclosed UIDocumentView with a hidable scroll bar and page up/down taps. Semantically, and in case of likely future extensions, the class should only be used for displaying musical scores.
Created by Lari O Rasku, tkol on 5/27/11. Copyright 2011 __MyCompanyName__. All rights reserved.
Definition at line 13 of file UIScoreView.h.
- (void) dealloc | [implementation] |
Definition at line 164 of file UIScoreView.m.
References documentView, and scrollBar.
- (BOOL) gestureRecognizer: | (UIGestureRecognizer *) | gestureRecognizer | |
shouldRecognizeSimultaneouslyWithGestureRecognizer: | (UIGestureRecognizer *) | otherGestureRecognizer | |
[implementation] |
Dummy method to allow for other gesture recognizers beside the scrollbar-toggling one.
Definition at line 147 of file UIScoreView.m.
- (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 31 of file UIScoreView.m.
References UIScrollBar::delegate, UIDocumentView::delegate, UIScrollBar::direction, documentView, and scrollBar.
- (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 76 of file UIScoreView.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 90 of file UIScoreView.m.
References init.
- (BOOL) setScore: | (NSString *) | scorePath |
Sets a score to be shown by the score view.
scorePath | The path to the score file to be loaded. |
Definition at line 103 of file UIScoreView.m.
References UIDocumentView::document, documentView, and UIDocument::size.
- (void) showScrollBar: | (BOOL) | show |
Shows or hides the scroll bar with a sliding animation.
show | YES to show the scrollbar, NO to hide it. |
Definition at line 122 of file UIScoreView.m.
- (void) tapGesture: | (UIGestureRecognizer *) | gestureRecognizer | [implementation] |
Handler for tap gestures.
Definition at line 153 of file UIScoreView.m.
References scrollBar, and showScrollBar:.
- (UIDocumentView*) documentView [protected] |
Definition at line 15 of file UIScoreView.h.
- (UIScrollBar*) scrollBar [protected] |
Definition at line 14 of file UIScoreView.h.
- (IBOutlet UIDocumentView*) documentView [read, write, retain] |
A document view object for displaying the score.
Definition at line 25 of file UIScoreView.h.
- (IBOutlet UIScrollBar*) scrollBar [read, write, retain] |
A vertical scroll bar for ease of scrolling.
Definition at line 22 of file UIScoreView.h.