Debian Codegraph @

Xpjproject/pjsip-apps/src/ipjsystest/Classes/TestViewController.m

raw
1 /*
2 * Copyright (C) 2010-2011 Teluu Inc. (http://www.teluu.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 #import "TestViewController.h"
19
20 @implementation TestViewController
21 @synthesize testDesc;
22 @synthesize button1;
23 @synthesize button2;
24 @synthesize key;
25
26 - (void)button1Pressed:(id)sender {
27 self.key = 1;
28 [self.button1 setHidden:true];
29 [self.button2 setHidden:true];
30 }
31
32 - (void)button2Pressed:(id)sender {
33 self.key = 2;
34 [self.button1 setHidden:true];
35 [self.button2 setHidden:true];
36 }
37
38 /*
39 // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
40 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
41 if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
42 // Custom initialization
43 }
44 return self;
45 }
46 */
47
48 /*
49 // Implement loadView to create a view hierarchy programmatically, without using a nib.
50 - (void)loadView {
51 }
52 */
53
54
55 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
56 - (void)viewDidLoad {
57 [super viewDidLoad];
58
59 [button1 addTarget:self action:@selector(button1Pressed:) forControlEvents:(UIControlEvents)UIControlEventTouchDown];
60 [button2 addTarget:self action:@selector(button2Pressed:) forControlEvents:(UIControlEvents)UIControlEventTouchDown];
61 [testDesc setEditable:false];
62 }
63
64 /*
65 // Override to allow orientations other than the default portrait orientation.
66 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
67 // Return YES for supported orientations
68 return (interfaceOrientation == UIInterfaceOrientationPortrait);
69 }
70 */
71
72 - (void)didReceiveMemoryWarning {
73 // Releases the view if it doesn't have a superview.
74 [super didReceiveMemoryWarning];
75
76 // Release any cached data, images, etc that aren't in use.
77 }
78
79 - (void)viewDidUnload {
80 // Release any retained subviews of the main view.
81 // e.g. self.myOutlet = nil;
82 }
83
84
85 - (void)dealloc {
86 [super dealloc];
87 }
88
89
90 @end