70 lines
1.4 KiB
Objective-C
70 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"
|
|
|
|
|
|
@implementation GrammarTestViewController
|
|
|
|
@synthesize conjugator = _conjugator;
|
|
@synthesize verbInput = _verbInput;
|
|
@synthesize tense = _tense;
|
|
@synthesize verb = _verb;
|
|
@synthesize conjugatedVerbTable = _conjugatedVerbTable;
|
|
|
|
|
|
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
|
{
|
|
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
|
if (self) {
|
|
// Custom initialization
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (IBAction)verbEntered:(id)sender {
|
|
self.verb = self.verbInput.text;
|
|
[self.view resignFirstResponder];
|
|
}
|
|
|
|
- (void) verb:(NSString *) verb {
|
|
_verb = verb;
|
|
if ( ! [_verb isEqualToString:self.verbInput.text])
|
|
self.verbInput.text = _verb;
|
|
}
|
|
|
|
- (void) setup{
|
|
NSLog([self.conjugator description]);
|
|
NSLog(@"Persons %d", [[[self conjugator] persons] count]);
|
|
}
|
|
|
|
- (void) awakeFromNib
|
|
{
|
|
[self setup];
|
|
}
|
|
|
|
- (void)viewDidLoad
|
|
{
|
|
[super viewDidLoad];
|
|
// Do any additional setup after loading the view.
|
|
|
|
[self setup];
|
|
}
|
|
|
|
- (void)didReceiveMemoryWarning
|
|
{
|
|
[super didReceiveMemoryWarning];
|
|
// Dispose of any resources that can be recreated.
|
|
}
|
|
;
|
|
- (void)viewDidUnload {
|
|
[self setVerbInput:nil];
|
|
[super viewDidUnload];
|
|
}
|
|
@end
|