Skip to content

Commit 3ab56d3

Browse files
committed
Initial commit of ios-auto
0 parents  commit 3ab56d3

50 files changed

Lines changed: 3891 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
main/Utility/Properties/Resources.resources
3+
4+
main/Testing/Properties/.DS_Store

LICENSE.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright [2012] [Dan Cuellar]
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// MyViewControllerViewController.h
3+
// Test App 2
4+
//
5+
// Created by Joseph Cuellar on 8/1/12.
6+
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface MyViewControllerViewController : UIViewController
12+
@property (retain, nonatomic) IBOutlet UITextField *firstArg;
13+
@property (retain, nonatomic) IBOutlet UITextField *secondArg;
14+
@property (retain, nonatomic) IBOutlet UILabel *answerLabel;
15+
16+
- (IBAction)computeAction:(id)sender;
17+
18+
@end
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
//
2+
// MyViewControllerViewController.m
3+
// Test App 2
4+
//
5+
// Created by Joseph Cuellar on 8/1/12.
6+
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7+
//
8+
9+
#import "MyViewControllerViewController.h"
10+
11+
@interface MyViewControllerViewController ()
12+
13+
@end
14+
15+
@implementation MyViewControllerViewController
16+
@synthesize answerLabel;
17+
@synthesize firstArg;
18+
@synthesize secondArg;
19+
20+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
21+
{
22+
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
23+
if (self) {
24+
// Custom initialization
25+
}
26+
[firstArg setAccessibilityLabel:@"IntegerA"];
27+
[secondArg setAccessibilityLabel:@"IntegerB"];
28+
[answerLabel setAccessibilityLabel:@"Compute Sum"];
29+
30+
return self;
31+
}
32+
33+
- (void)viewDidLoad
34+
{
35+
[super viewDidLoad];
36+
// Do any additional setup after loading the view from its nib.
37+
}
38+
39+
- (void)viewDidUnload
40+
{
41+
[self setFirstArg:nil];
42+
[self setSecondArg:nil];
43+
[self setAnswerLabel:nil];
44+
[super viewDidUnload];
45+
// Release any retained subviews of the main view.
46+
// e.g. self.myOutlet = nil;
47+
}
48+
49+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
50+
{
51+
return (interfaceOrientation == UIInterfaceOrientationPortrait);
52+
}
53+
54+
- (void)dealloc {
55+
[firstArg release];
56+
[secondArg release];
57+
[answerLabel release];
58+
[super dealloc];
59+
}
60+
- (IBAction)computeAction:(id)sender {
61+
int a = [[firstArg text] intValue];
62+
int b = [[secondArg text] intValue];
63+
int sum = a + b;
64+
NSString *newLabelValue = [NSString stringWithFormat:@"%d",sum];
65+
[answerLabel setText:newLabelValue];
66+
}
67+
@end

0 commit comments

Comments
 (0)