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