CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
/Users/awniemel/Notepad-SVN/svn/trunk/CatNiP/CatNiP/NotesPopoverController.m
Go to the documentation of this file.
00001 //
00002 //  NotesPopoverController.m
00003 //  CatNiP
00004 //
00005 //  A popover for displaying user notes about a score.
00006 //
00007 //  Created by Lari O Rasku, tkol on 6/6/11.
00008 //  Copyright 2011 __MyCompanyName__. All rights reserved.
00009 //
00010 #import "NotesPopoverController.h"
00011 #import "CatNiPViewController.h"
00012 
00013 @implementation NotesPopoverController
00014 @synthesize textView;
00015 @synthesize master;
00016 
00017 - (id)initWithMaster:(CatNiPViewController *)m
00018 {
00019     self = [super init];
00020     if (self) {
00021         self.master = m;
00022         [self.textView setAutocorrectionType:UITextAutocorrectionTypeNo];
00023         [self.textView setAutocapitalizationType:UITextAutocapitalizationTypeNone];
00024         // Custom initialization
00025     }
00026     return self;
00027 }
00028 
00029 - (void)dealloc
00030 {
00031     [textView release];
00032     [super dealloc];
00033 }
00034 
00035 - (void)didReceiveMemoryWarning
00036 {
00037     // Releases the view if it doesn't have a superview.
00038     [super didReceiveMemoryWarning];
00039     
00040     // Release any cached data, images, etc that aren't in use.
00041 }
00042 
00043 #pragma mark - View lifecycle
00044 
00045 - (void)viewDidLoad
00046 {
00047     [super viewDidLoad];
00048     // Do any additional setup after loading the view from its nib.
00049 }
00050 
00051 - (void)viewDidUnload
00052 {
00053     [self setTextView:nil];
00054     [super viewDidUnload];
00055     // Release any retained subviews of the main view.
00056     // e.g. self.myOutlet = nil;
00057 }
00058 
00059 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
00060 {
00061     // Return YES for supported orientations
00062         return YES;
00063 }
00064 
00065 - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
00066 {
00067     // save text to shown scores userNotes
00068     if (self.master.currentScore != nil) self.master.currentScore.userNotes = self.textView.text;
00069 }
00070 
00071 
00072 
00073 @end
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines