Restore after deleting tense
This commit is contained in:
parent
af0959ff7b
commit
04dd58a040
Binary file not shown.
5
Espagram/Espagram.xcdatamodeld/.xccurrentversion
Normal file
5
Espagram/Espagram.xcdatamodeld/.xccurrentversion
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
21
Espagram/Espagram/ConjugatedTense.h
Normal file
21
Espagram/Espagram/ConjugatedTense.h
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// ConjugatedTense.h
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 8/29/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
@class Conjugations, Tenses, Verbs;
|
||||
|
||||
@interface ConjugatedTense : NSManagedObject
|
||||
|
||||
@property (nonatomic, retain) NSNumber * regularConjugation;
|
||||
@property (nonatomic, retain) Verbs *verb;
|
||||
@property (nonatomic, retain) Tenses *tense;
|
||||
@property (nonatomic, retain) Conjugations *irregularConjugation;
|
||||
|
||||
@end
|
||||
22
Espagram/Espagram/ConjugatedTense.m
Normal file
22
Espagram/Espagram/ConjugatedTense.m
Normal file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// ConjugatedTense.m
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 8/29/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ConjugatedTense.h"
|
||||
#import "Conjugations.h"
|
||||
#import "Tenses.h"
|
||||
#import "Verbs.h"
|
||||
|
||||
|
||||
@implementation ConjugatedTense
|
||||
|
||||
@dynamic regularConjugation;
|
||||
@dynamic verb;
|
||||
@dynamic tense;
|
||||
@dynamic irregularConjugation;
|
||||
|
||||
@end
|
||||
13
Espagram/Espagram/ConjugatedVerbTableView.h
Normal file
13
Espagram/Espagram/ConjugatedVerbTableView.h
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// ConjugatedVerbTableView.h
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 11/8/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ConjugatedVerbTableView : UITableView
|
||||
|
||||
@end
|
||||
31
Espagram/Espagram/ConjugatedVerbTableView.m
Normal file
31
Espagram/Espagram/ConjugatedVerbTableView.m
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// ConjugatedVerbTableView.m
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 11/8/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ConjugatedVerbTableView.h"
|
||||
|
||||
@implementation ConjugatedVerbTableView
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
20
Espagram/Espagram/Conjugations.h
Normal file
20
Espagram/Espagram/Conjugations.h
Normal file
@ -0,0 +1,20 @@
|
||||
//
|
||||
// Conjugations.h
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 8/29/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
@class Persons;
|
||||
|
||||
@interface Conjugations : NSManagedObject
|
||||
|
||||
@property (nonatomic, retain) NSString * root;
|
||||
@property (nonatomic, retain) NSString * exit;
|
||||
@property (nonatomic, retain) Persons *conjugationPerson;
|
||||
|
||||
@end
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// Tense.h
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 11/8/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface Tense : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString * tense;
|
||||
|
||||
- (NSString *) getTenseInLanguage:(NSString *)language;
|
||||
|
||||
@end
|
||||
@ -1,73 +0,0 @@
|
||||
//
|
||||
// Tense.m
|
||||
// Espagram
|
||||
//
|
||||
// Created by Abel Fokkinga on 11/8/12.
|
||||
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Tense.h"
|
||||
|
||||
@interface Tense()
|
||||
@property (nonatomic, strong) NSDictionary * text;
|
||||
@end
|
||||
|
||||
@implementation Tense
|
||||
|
||||
@synthesize tense = _tense;
|
||||
@synthesize text = _text;
|
||||
|
||||
- (void) tense:(NSString *)t {
|
||||
if ( ![t isEqualToString:_tense]){
|
||||
_tense = t;
|
||||
// reset dictionary
|
||||
NSLog(@"Resetting tense");
|
||||
self.text = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *) text {
|
||||
if ( !_text) {
|
||||
if ( [self.tense isEqualToString:@"SIMPLE_PRESENT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Presente",@"Simple present",@"Onvoltooid tegenwoordige tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"SIMPLE_PAST"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Indefinido",@"Simple past",@"Verleden tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"IMPERFECT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Imperfecto",@"Imperfect",@"Onvoltooid verleden tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"FUTURE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Futuro",@"Future",@"Toekomstige tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"PRESENT_PERFECT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Perfecto",@"Present perfect",@"Pretérito perfecto",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"PAST_PERFECT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Pluscuamperfecto",@"Past perfect",@"Pretérito pluscuamperfecto",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"FUTURE_PERFECT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Futuro perfecto",@"Future perfect",@"Pretérito pluscuamperfecto",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"CONDITIONAL"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Condicional",@"Conditional",@"Voorwaardelijke wijs",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"GERUND"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Gerundio",@"Gerund",@"Tegenwoordig deelwoord",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"IMPERATIVE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Imperativo",@"Imperative",@"Gebiedende wijs",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
}
|
||||
|
||||
return _text;
|
||||
}
|
||||
|
||||
- (NSString *) getTenseInLanguage:(NSString *)language {
|
||||
return [self.text objectForKey:language];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
Loading…
x
Reference in New Issue
Block a user