64 lines
1.4 KiB
Objective-C
64 lines
1.4 KiB
Objective-C
//
|
|
// GrammarTestViewController.m
|
|
// Espagram
|
|
//
|
|
// Created by Abel Fokkinga on 10/15/12.
|
|
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
|
//
|
|
|
|
#import "GrammarTestViewController.h"
|
|
#import "Conjugator.h"
|
|
|
|
|
|
@implementation GrammarTestViewController
|
|
|
|
@synthesize conjugator = _conjugator;
|
|
@synthesize verbInput = _verbInput;
|
|
@synthesize tense = _tense;
|
|
|
|
|
|
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
|
{
|
|
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
|
if (self) {
|
|
// Custom initialization
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (IBAction)verbEntered:(id *)sender {
|
|
[self resignFirstResponder];
|
|
}
|
|
|
|
- (void) setTense:(NSString *)tense {
|
|
NSLog(@"New tense: %@",tense);
|
|
if ( ![tense isEqualToString:_tense] ) {
|
|
NSLog(@"Setting tense: %@",tense);
|
|
_tense = tense;
|
|
self.tenseLabel.text = tense;
|
|
}
|
|
|
|
}
|
|
|
|
- (IBAction)conjugateButtonPressed {
|
|
// self.conjugatedVerbDisplay.text = [self.conjugator conjugateVerb:self.verbInput.text inPerson:[self getSelectedPerson] andTense:[self getSelectedTense] ];
|
|
}
|
|
|
|
- (void)viewDidLoad
|
|
{
|
|
[super viewDidLoad];
|
|
// Do any additional setup after loading the view.
|
|
}
|
|
|
|
- (void)didReceiveMemoryWarning
|
|
{
|
|
[super didReceiveMemoryWarning];
|
|
// Dispose of any resources that can be recreated.
|
|
}
|
|
;
|
|
- (void)viewDidUnload {
|
|
[self setVerbInput:nil];
|
|
[super viewDidUnload];
|
|
}
|
|
@end
|