-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3ab56d3
Showing
50 changed files
with
3,891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
main/Utility/Properties/Resources.resources | ||
|
||
main/Testing/Properties/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright [2012] [Dan Cuellar] | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// MyViewControllerViewController.h | ||
// Test App 2 | ||
// | ||
// Created by Joseph Cuellar on 8/1/12. | ||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface MyViewControllerViewController : UIViewController | ||
@property (retain, nonatomic) IBOutlet UITextField *firstArg; | ||
@property (retain, nonatomic) IBOutlet UITextField *secondArg; | ||
@property (retain, nonatomic) IBOutlet UILabel *answerLabel; | ||
|
||
- (IBAction)computeAction:(id)sender; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// | ||
// MyViewControllerViewController.m | ||
// Test App 2 | ||
// | ||
// Created by Joseph Cuellar on 8/1/12. | ||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import "MyViewControllerViewController.h" | ||
|
||
@interface MyViewControllerViewController () | ||
|
||
@end | ||
|
||
@implementation MyViewControllerViewController | ||
@synthesize answerLabel; | ||
@synthesize firstArg; | ||
@synthesize secondArg; | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
[firstArg setAccessibilityLabel:@"IntegerA"]; | ||
[secondArg setAccessibilityLabel:@"IntegerB"]; | ||
[answerLabel setAccessibilityLabel:@"Compute Sum"]; | ||
|
||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view from its nib. | ||
} | ||
|
||
- (void)viewDidUnload | ||
{ | ||
[self setFirstArg:nil]; | ||
[self setSecondArg:nil]; | ||
[self setAnswerLabel:nil]; | ||
[super viewDidUnload]; | ||
// Release any retained subviews of the main view. | ||
// e.g. self.myOutlet = nil; | ||
} | ||
|
||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation | ||
{ | ||
return (interfaceOrientation == UIInterfaceOrientationPortrait); | ||
} | ||
|
||
- (void)dealloc { | ||
[firstArg release]; | ||
[secondArg release]; | ||
[answerLabel release]; | ||
[super dealloc]; | ||
} | ||
- (IBAction)computeAction:(id)sender { | ||
int a = [[firstArg text] intValue]; | ||
int b = [[secondArg text] intValue]; | ||
int sum = a + b; | ||
NSString *newLabelValue = [NSString stringWithFormat:@"%d",sum]; | ||
[answerLabel setText:newLabelValue]; | ||
} | ||
@end |
Oops, something went wrong.