Version 1.0

This commit is contained in:
Abel Fokkinga 2012-12-20 18:09:11 +01:00
parent 3e9eb6a7e0
commit 366dd2fc0a
19 changed files with 946 additions and 248 deletions

View File

@ -25,9 +25,10 @@
B51F8E4416519D440033B614 /* iPhoneIcon_Small.png in Resources */ = {isa = PBXBuildFile; fileRef = B51F8E4316519D440033B614 /* iPhoneIcon_Small.png */; };
B51F8E4616519D490033B614 /* iPhoneIcon_Big.png in Resources */ = {isa = PBXBuildFile; fileRef = B51F8E4516519D490033B614 /* iPhoneIcon_Big.png */; };
B51F8E4816519FE00033B614 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B51F8E4716519FE00033B614 /* CoreData.framework */; };
B545DFFC167A5F2800DFBF11 /* Default Espagram database.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = B545DFFB167A5F2800DFBF11 /* Default Espagram database.sqlite */; };
B545DFFF167BA00300DFBF11 /* espagram57.png in Resources */ = {isa = PBXBuildFile; fileRef = B545DFFE167BA00300DFBF11 /* espagram57.png */; };
B545E001167BA01700DFBF11 /* espagram117.png in Resources */ = {isa = PBXBuildFile; fileRef = B545E000167BA01700DFBF11 /* espagram117.png */; };
B54CFB611652D2A700C0823D /* Lesson+Create.m in Sources */ = {isa = PBXBuildFile; fileRef = B51F8E3C16519D090033B614 /* Lesson+Create.m */; };
B54CFB6A1652D43900C0823D /* Verb.m in Sources */ = {isa = PBXBuildFile; fileRef = B54CFB691652D43900C0823D /* Verb.m */; };
B54CFB6D1652D43900C0823D /* Lesson.m in Sources */ = {isa = PBXBuildFile; fileRef = B54CFB6C1652D43900C0823D /* Lesson.m */; };
B54CFB761652E03600C0823D /* EspagramNewLessonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B54CFB751652E03600C0823D /* EspagramNewLessonViewController.m */; };
B56DE15C165412DF00D85DD3 /* EspagramWordsInLessonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B56DE15B165412DF00D85DD3 /* EspagramWordsInLessonViewController.m */; };
B56DE160165426B800D85DD3 /* EspagramAddWordToLessonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B56DE15F165426B800D85DD3 /* EspagramAddWordToLessonViewController.m */; };
@ -36,10 +37,24 @@
B56DE1691655774E00D85DD3 /* Lesson+Test.m in Sources */ = {isa = PBXBuildFile; fileRef = B56DE1681655774D00D85DD3 /* Lesson+Test.m */; };
B5A8BB191651A64300C1CC00 /* CoreDataTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B5A8BB181651A3E700C1CC00 /* CoreDataTableViewController.m */; };
B5B3F92D165972EF00E26A40 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B5B3F92F165972EF00E26A40 /* Localizable.strings */; };
B5B3F93516602C7C00E26A40 /* Verb.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B3F93416602C7B00E26A40 /* Verb.m */; };
B5B3F93816602C7D00E26A40 /* TestResult.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B3F93716602C7C00E26A40 /* TestResult.m */; };
B5B3F93B16602C7E00E26A40 /* Lesson.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B3F93A16602C7E00E26A40 /* Lesson.m */; };
B5EC6CED1656F1960030C27F /* Verb+Create.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EC6CEC1656F1960030C27F /* Verb+Create.m */; };
B5EFD392162CB18000C6E2EB /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B5EFD391162CB18000C6E2EB /* Default-568h@2x.png */; };
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
B545DFFD167A87BE00DFBF11 /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
);
};
/* End PBXBuildRule section */
/* Begin PBXFileReference section */
B506EC5E15EBF67500566A27 /* Espagram.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Espagram.app; sourceTree = BUILT_PRODUCTS_DIR; };
B506EC6215EBF67500566A27 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@ -71,10 +86,9 @@
B51F8E4316519D440033B614 /* iPhoneIcon_Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iPhoneIcon_Small.png; sourceTree = "<group>"; };
B51F8E4516519D490033B614 /* iPhoneIcon_Big.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iPhoneIcon_Big.png; sourceTree = "<group>"; };
B51F8E4716519FE00033B614 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
B54CFB681652D43900C0823D /* Verb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Verb.h; sourceTree = "<group>"; };
B54CFB691652D43900C0823D /* Verb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Verb.m; sourceTree = "<group>"; };
B54CFB6B1652D43900C0823D /* Lesson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lesson.h; sourceTree = "<group>"; };
B54CFB6C1652D43900C0823D /* Lesson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Lesson.m; sourceTree = "<group>"; };
B545DFFB167A5F2800DFBF11 /* Default Espagram database.sqlite */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Default Espagram database.sqlite"; sourceTree = "<group>"; };
B545DFFE167BA00300DFBF11 /* espagram57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = espagram57.png; sourceTree = "<group>"; };
B545E000167BA01700DFBF11 /* espagram117.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = espagram117.png; sourceTree = "<group>"; };
B54CFB741652E03600C0823D /* EspagramNewLessonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EspagramNewLessonViewController.h; sourceTree = "<group>"; };
B54CFB751652E03600C0823D /* EspagramNewLessonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EspagramNewLessonViewController.m; sourceTree = "<group>"; };
B56DE15A165412DF00D85DD3 /* EspagramWordsInLessonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EspagramWordsInLessonViewController.h; sourceTree = "<group>"; };
@ -96,6 +110,12 @@
B5B3F930165972F600E26A40 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
B5B3F931165AC79200E26A40 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
B5B3F932165AD45400E26A40 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
B5B3F93316602C7B00E26A40 /* Verb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Verb.h; sourceTree = "<group>"; };
B5B3F93416602C7B00E26A40 /* Verb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Verb.m; sourceTree = "<group>"; };
B5B3F93616602C7C00E26A40 /* TestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestResult.h; sourceTree = "<group>"; };
B5B3F93716602C7C00E26A40 /* TestResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestResult.m; sourceTree = "<group>"; };
B5B3F93916602C7E00E26A40 /* Lesson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lesson.h; sourceTree = "<group>"; };
B5B3F93A16602C7E00E26A40 /* Lesson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Lesson.m; sourceTree = "<group>"; };
B5EC6CEB1656F1960030C27F /* Verb+Create.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Verb+Create.h"; sourceTree = "<group>"; };
B5EC6CEC1656F1960030C27F /* Verb+Create.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Verb+Create.m"; sourceTree = "<group>"; };
B5EFD391162CB18000C6E2EB /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
@ -119,6 +139,9 @@
B506EC5315EBF67500566A27 = {
isa = PBXGroup;
children = (
B545E000167BA01700DFBF11 /* espagram117.png */,
B545DFFE167BA00300DFBF11 /* espagram57.png */,
B545DFFB167A5F2800DFBF11 /* Default Espagram database.sqlite */,
B51F8E4716519FE00033B614 /* CoreData.framework */,
B51F8E4516519D490033B614 /* iPhoneIcon_Big.png */,
B51F8E4316519D440033B614 /* iPhoneIcon_Small.png */,
@ -182,11 +205,13 @@
B506EC6915EBF67500566A27 /* Supporting Files */,
B51F8E1F164FF8930033B614 /* Tense.h */,
B51F8E20164FF8930033B614 /* Tense.m */,
B5B3F93316602C7B00E26A40 /* Verb.h */,
B5B3F93916602C7E00E26A40 /* Lesson.h */,
B5B3F93A16602C7E00E26A40 /* Lesson.m */,
B5B3F93616602C7C00E26A40 /* TestResult.h */,
B5B3F93716602C7C00E26A40 /* TestResult.m */,
B5B3F93416602C7B00E26A40 /* Verb.m */,
B51F8E22165199F80033B614 /* Espagram.xcdatamodeld */,
B54CFB681652D43900C0823D /* Verb.h */,
B54CFB691652D43900C0823D /* Verb.m */,
B54CFB6B1652D43900C0823D /* Lesson.h */,
B54CFB6C1652D43900C0823D /* Lesson.m */,
B56DE1611654382500D85DD3 /* Lesson+Conjugator.h */,
B56DE1621654382500D85DD3 /* Lesson+Conjugator.m */,
B56DE1671655774D00D85DD3 /* Lesson+Test.h */,
@ -221,6 +246,7 @@
B506EC5C15EBF67500566A27 /* Resources */,
);
buildRules = (
B545DFFD167A87BE00DFBF11 /* PBXBuildRule */,
);
dependencies = (
);
@ -270,6 +296,9 @@
B51F8E4416519D440033B614 /* iPhoneIcon_Small.png in Resources */,
B51F8E4616519D490033B614 /* iPhoneIcon_Big.png in Resources */,
B5B3F92D165972EF00E26A40 /* Localizable.strings in Resources */,
B545DFFC167A5F2800DFBF11 /* Default Espagram database.sqlite in Resources */,
B545DFFF167BA00300DFBF11 /* espagram57.png in Resources */,
B545E001167BA01700DFBF11 /* espagram117.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -292,8 +321,6 @@
B51F8E3916519C850033B614 /* EspagramLessonViewController.m in Sources */,
B5A8BB191651A64300C1CC00 /* CoreDataTableViewController.m in Sources */,
B54CFB611652D2A700C0823D /* Lesson+Create.m in Sources */,
B54CFB6A1652D43900C0823D /* Verb.m in Sources */,
B54CFB6D1652D43900C0823D /* Lesson.m in Sources */,
B54CFB761652E03600C0823D /* EspagramNewLessonViewController.m in Sources */,
B56DE15C165412DF00D85DD3 /* EspagramWordsInLessonViewController.m in Sources */,
B56DE160165426B800D85DD3 /* EspagramAddWordToLessonViewController.m in Sources */,
@ -301,6 +328,9 @@
B56DE1661655769300D85DD3 /* TestableVerb.m in Sources */,
B56DE1691655774E00D85DD3 /* Lesson+Test.m in Sources */,
B5EC6CED1656F1960030C27F /* Verb+Create.m in Sources */,
B5B3F93516602C7C00E26A40 /* Verb.m in Sources */,
B5B3F93816602C7D00E26A40 /* TestResult.m in Sources */,
B5B3F93B16602C7E00E26A40 /* Lesson.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -389,11 +419,15 @@
B506EC7D15EBF67500566A27 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Abel Fokkinga (P764G4C7BB)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Espagram/Espagram-Prefix.pch";
INFOPLIST_FILE = "Espagram/Espagram-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "D1DA148D-74FB-4B18-82EB-1E4B06A36830";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
@ -402,11 +436,13 @@
B506EC7E15EBF67500566A27 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Distribution: Abel Fokkinga";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Espagram/Espagram-Prefix.pch";
INFOPLIST_FILE = "Espagram/Espagram-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "B9D6A7A6-94DA-4D3D-AD3E-2204789BC56E";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};

View File

@ -16,8 +16,8 @@
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>iPhoneIcon_Small.png</string>
<string>iPhoneIcon_Big.png</string>
<string>espagram57.png</string>
<string>espagram117.png</string>
</array>
</dict>
</dict>
@ -28,6 +28,9 @@
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>Dutch</string>
<string>Spanish</string>
<string>Portugese</string>
</array>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
@ -38,7 +41,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.0.1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
@ -51,6 +54,16 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
<dict>
<key>Style</key>
<string>UIBarStyleDefault</string>
<key>Translucent</key>
<false/>
</dict>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>

View File

@ -8,13 +8,22 @@
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="verbs" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Verb" inverseName="lesson" inverseEntity="Verb" syncable="YES"/>
</entity>
<entity name="TestResult" representedClassName="TestResult" syncable="YES">
<attribute name="conjugatedPerson" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="failedCounter" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
<attribute name="passedCounter" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
<attribute name="testType" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="verb" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Verb" inverseName="testResults" inverseEntity="Verb" syncable="YES"/>
</entity>
<entity name="Verb" representedClassName="Verb" syncable="YES">
<attribute name="meaning" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="verb" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="lesson" optional="YES" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Lesson" inverseName="verbs" inverseEntity="Lesson" syncable="YES"/>
<relationship name="testResults" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="TestResult" inverseName="verb" inverseEntity="TestResult" syncable="YES"/>
</entity>
<elements>
<element name="Lesson" positionX="160" positionY="192" width="128" height="135"/>
<element name="Verb" positionX="403" positionY="198" width="128" height="88"/>
<element name="Lesson" positionX="187" positionY="-54" width="128" height="135"/>
<element name="Verb" positionX="403" positionY="198" width="128" height="103"/>
<element name="TestResult" positionX="160" positionY="201" width="128" height="118"/>
</elements>
</model>

View File

@ -65,10 +65,11 @@
request.sortDescriptors = [[NSArray alloc] initWithObjects:[[NSSortDescriptor alloc] initWithKey:@"title" ascending:TRUE], nil];
self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request managedObjectContext:self.lessonsDatabase.managedObjectContext sectionNameKeyPath:nil cacheName:nil];
}
- (void) createDocument
{
{
[self.lessonsDatabase saveToURL:self.lessonsDatabase.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL succes){
NSLog(@"Created lessons database");
}];
@ -79,6 +80,7 @@
- (void) useDocument
{
if (![[NSFileManager defaultManager] fileExistsAtPath:[self.lessonsDatabase.fileURL path]]) {
NSLog(@"No database exists");
[self createDocument];
[self fetchedResultsController];
} else if (self.lessonsDatabase.documentState == UIDocumentStateClosed){
@ -89,7 +91,6 @@
} else if (self.lessonsDatabase.documentState == UIDocumentStateNormal) {
[self setupFetchedResultsController];
}
}
@ -108,6 +109,28 @@
self.title = NSLocalizedString(@"Lessons title",@"Lessons title");
if (!self.lessonsDatabase) { // We'll create a default database if none is set
NSFileManager * fileManager = [NSFileManager defaultManager];
NSURL *storeURL = [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDirectory] lastObject] URLByAppendingPathComponent: @"Default Espagram database"];
NSLog(@"DB url: %@", storeURL.path);
if (![fileManager fileExistsAtPath:storeURL.path]) {
NSString *defaultStorePath = [[NSBundle mainBundle] pathForResource:@"Default Espagram database" ofType:@"sqlite"];
//NSString *defaultStorePath = [[[NSBundle mainBundle] resourcePath]
// stringByAppendingPathComponent:@"Default Espagram database"];
if ( [fileManager fileExistsAtPath:defaultStorePath]) {
NSLog(@"Default DB present in app");
NSError *error;
[fileManager copyItemAtPath:defaultStorePath toPath:storeURL.path error:&error];
NSLog(@"%@",error.debugDescription );
}
}
NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDirectory] lastObject];
url = [url URLByAppendingPathComponent:@"Default Espagram database"];
@ -131,7 +154,6 @@
}];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Lesson cell";
@ -140,7 +162,21 @@
Lesson *lesson = [self.fetchedResultsController objectAtIndexPath:indexPath];
NSLog(@"Showing lesson: %@", lesson.title);
cell.textLabel.text = lesson.title;
cell.detailTextLabel.text = lesson.subTitle;
NSString * lessonDescription = lesson.subTitle;
if (lessonDescription.length == 0 && [lesson.verbs count] > 0 ) {
for ( Verb * v in lesson.verbs) {
if (lessonDescription.length == 0) {
lessonDescription = v.verb;
} else {
lessonDescription = [[lessonDescription stringByAppendingString:@", "] stringByAppendingString:v.verb];
if ( lessonDescription.length > 50)
break;
}
}
}
cell.detailTextLabel.text = lessonDescription;
return cell;
}

View File

@ -14,6 +14,7 @@
@interface EspagramMainTableViewController ()
@property (nonatomic, strong) NSString *language, *displayTitle;
@property (nonatomic, strong) Tense * tense;
@property (nonatomic, strong) UIManagedDocument * lessonsDatabase;
@end
@implementation EspagramMainTableViewController
@ -22,6 +23,7 @@
@synthesize tense = _tense;
@synthesize displayTitle = _displayTitle;
@synthesize aboutButton = _aboutButton;
@synthesize lessonsDatabase = _lessonsDatabase;
- (id)initWithStyle:(UITableViewStyle)style
{
@ -32,13 +34,6 @@
return self;
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.aboutButton setTitle:NSLocalizedString(@"About button", @"About button text")];
}
# pragma mark - Espagram setters and getters
@ -69,54 +64,92 @@
if ( [segue.identifier isEqualToString:@"Show Lessons"]) {
[segue.destinationViewController setConjugator:[self getLanguage]];
[segue.destinationViewController setTense:self.tense];
[segue.destinationViewController setLessonsDatabase:self.lessonsDatabase];
}
}
#pragma mark - Table view data source
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
- (void) createDocument
{
// Return NO if you do not want the specified item to be editable.
return YES;
[self.lessonsDatabase saveToURL:self.lessonsDatabase.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL succes){
NSLog(@"Created lessons database");
}];
}
*/
/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
- (void) useDocument
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
if (![[NSFileManager defaultManager] fileExistsAtPath:[self.lessonsDatabase.fileURL path]]) {
NSLog(@"No database exists");
[self createDocument];
} else if (self.lessonsDatabase.documentState == UIDocumentStateClosed){
[self.lessonsDatabase openWithCompletionHandler:^(BOOL succes){
NSLog(@"Opened lessons database");
}];
}
}
*/
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
- (void) setLessonsDatabase:(UIManagedDocument *)lessonsDatabase{
if ( _lessonsDatabase != lessonsDatabase ) {
_lessonsDatabase = lessonsDatabase;
[self useDocument];
}
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the item to be re-orderable.
return YES;
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.aboutButton setTitle:NSLocalizedString(@"About button", @"About button text")];
if (!self.lessonsDatabase) { // We'll create a default database if none is set
NSFileManager * fileManager = [NSFileManager defaultManager];
NSURL *storeURL = [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDirectory] lastObject] URLByAppendingPathComponent: @"Default Espagram database"];
NSLog(@"DB url: %@", storeURL.path);
if (![fileManager fileExistsAtPath:storeURL.path]) {
NSString *defaultStorePath = [[NSBundle mainBundle] pathForResource:@"Default Espagram database" ofType:@"sqlite"];
//NSString *defaultStorePath = [[[NSBundle mainBundle] resourcePath]
// stringByAppendingPathComponent:@"Default Espagram database"];
if ( [fileManager fileExistsAtPath:defaultStorePath]) {
NSLog(@"Default DB present in app");
NSError *error;
[fileManager copyItemAtPath:defaultStorePath toPath:storeURL.path error:&error];
NSLog(@"%@",error.debugDescription );
}
}
NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDirectory] lastObject];
url = [url URLByAppendingPathComponent:@"Default Espagram database"];
UIManagedDocument *doc = [[UIManagedDocument alloc] initWithFileURL:url];
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
doc.persistentStoreOptions = options;
self.lessonsDatabase = doc;
}
}
*/
#pragma mark - Table view delegate
- (void)viewDidUnload {
[super viewDidUnload];
[self.lessonsDatabase closeWithCompletionHandler:^(BOOL success) {
NSLog(@"Database closed");
}];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

View File

@ -177,9 +177,9 @@
}
- (void)viewDidAppear:(BOOL)animated
- (void)viewWillAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[super viewWillAppear:animated];
self.nextButton.titleLabel.text = NSLocalizedString(@"Next", @"Next button in the testing screen to continue to the next verb");

View File

@ -50,6 +50,18 @@
managedObjectContext:self.lesson.managedObjectContext
sectionNameKeyPath:nil
cacheName:nil];
// Use for copying verbs from other tense
// if ( [self.lesson.verbs count] == 0){
// Lesson * copyLesson = [self getLessonWithName:self.lesson.title andTense:@"PRESENT_PERFECT" withConjugator:self.lesson.conjugator inContext:[self.lesson managedObjectContext]];
// if ( copyLesson && [copyLesson.verbs count] > 0){
// for (Verb * v in copyLesson.verbs) {
// [Verb addVerb:v.verb andMeaning:v.meaning toLesson:self.lesson];
// }
// [[self.lesson managedObjectContext] save:nil];
// }
// }
}
@ -60,7 +72,25 @@
[self setupFetchedResultsController];
}
- (Lesson *) getLessonWithName:(NSString *)title andTense:(NSString *)tense withConjugator:(NSString *)conjugator inContext:(NSManagedObjectContext *)context
{
Lesson * les = nil;
NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"Lesson"];
// Where clause
request.predicate = [NSCompoundPredicate andPredicateWithSubpredicates:[NSArray arrayWithObjects:[NSPredicate predicateWithFormat:@"title = %@", title],[NSPredicate predicateWithFormat:@"tense = %@", tense], [NSPredicate predicateWithFormat:@"conjugator = %@", conjugator],nil]];
NSError *error = nil;
NSArray *lessons = [context executeFetchRequest:request error:&error];
if ( lessons && lessons.count > 0 ){
return [lessons lastObject];
}
return les;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

View File

@ -2,7 +2,7 @@
// Lesson.h
// Espagram
//
// Created by Abel Fokkinga on 11/13/12.
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
@ -13,11 +13,11 @@
@interface Lesson : NSManagedObject
@property (nonatomic, retain) NSString * conjugator;
@property (nonatomic, retain) NSDate * dateAdded;
@property (nonatomic, retain) NSString * subTitle;
@property (nonatomic, retain) NSString * tense;
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * conjugator;
@property (nonatomic, retain) NSSet *verbs;
@end

View File

@ -2,7 +2,7 @@
// Lesson.m
// Espagram
//
// Created by Abel Fokkinga on 11/13/12.
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
@ -12,11 +12,11 @@
@implementation Lesson
@dynamic conjugator;
@dynamic dateAdded;
@dynamic subTitle;
@dynamic tense;
@dynamic title;
@dynamic conjugator;
@dynamic verbs;
@end

File diff suppressed because it is too large Load Diff

22
Espagram/TestResult.h Normal file
View File

@ -0,0 +1,22 @@
//
// TestResult.h
// Espagram
//
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class Verb;
@interface TestResult : NSManagedObject
@property (nonatomic, retain) NSString * conjugatedPerson;
@property (nonatomic, retain) NSNumber * failedCounter;
@property (nonatomic, retain) NSNumber * passedCounter;
@property (nonatomic, retain) NSString * testType;
@property (nonatomic, retain) Verb *verb;
@end

21
Espagram/TestResult.m Normal file
View File

@ -0,0 +1,21 @@
//
// TestResult.m
// Espagram
//
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
#import "TestResult.h"
#import "Verb.h"
@implementation TestResult
@dynamic conjugatedPerson;
@dynamic failedCounter;
@dynamic passedCounter;
@dynamic testType;
@dynamic verb;
@end

View File

@ -15,6 +15,8 @@
{
Verb * verb = [NSEntityDescription insertNewObjectForEntityForName:@"Verb" inManagedObjectContext:[lesson managedObjectContext]];
newVerb = [newVerb lowercaseString];
// Check first if the lessons already contains this verb
for ( Verb * v in lesson.verbs) {
if ( [newVerb isEqualToString:v.verb]) {

View File

@ -2,7 +2,7 @@
// Verb.h
// Espagram
//
// Created by Abel Fokkinga on 11/13/12.
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
@ -16,5 +16,14 @@
@property (nonatomic, retain) NSString * meaning;
@property (nonatomic, retain) NSString * verb;
@property (nonatomic, retain) Lesson *lesson;
@property (nonatomic, retain) NSSet *testResults;
@end
@interface Verb (CoreDataGeneratedAccessors)
- (void)addTestResultsObject:(NSManagedObject *)value;
- (void)removeTestResultsObject:(NSManagedObject *)value;
- (void)addTestResults:(NSSet *)values;
- (void)removeTestResults:(NSSet *)values;
@end

View File

@ -2,7 +2,7 @@
// Verb.m
// Espagram
//
// Created by Abel Fokkinga on 11/13/12.
// Created by Abel Fokkinga on 11/23/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
@ -15,5 +15,6 @@
@dynamic meaning;
@dynamic verb;
@dynamic lesson;
@dynamic testResults;
@end

View File

@ -171,7 +171,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Pluscuamperfecto Subjuntivo" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="czf-Xq-5Kq">
<rect key="frame" x="10" y="0.0" width="265" height="43"/>
<rect key="frame" x="10" y="0.0" width="260" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
@ -263,28 +263,6 @@
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Gerundio" id="kRC-7a-SX0">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="fT6-Nt-jMT" style="IBUITableViewCellStyleDefault" id="mI2-3t-9UQ">
<rect key="frame" x="0.0" y="810" width="320" height="46"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="280" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Gerundio" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fT6-Nt-jMT">
<rect key="frame" x="10" y="0.0" width="260" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="1uk-u0-as5" id="Kdo-S4-8aE"/>
@ -355,6 +333,20 @@
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="e-mail: espagram@pipoca.nl" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="adi-Lt-Evw">
<rect key="frame" x="17" y="309" width="291" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="or twitter: @espagram" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="doL-En-ghW">
<rect key="frame" x="20" y="331" width="291" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Gracias a" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bDD-gL-mmW">
<rect key="frame" x="38" y="178" width="245" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@ -383,6 +375,13 @@
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="We welcome your feedback via" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wtq-Dn-lbV">
<rect key="frame" x="18" y="287" width="291" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.50196081399917603" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</view>
@ -458,14 +457,14 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5Sn-mG-kVn">
<rect key="frame" x="41" y="33" width="238" height="21"/>
<rect key="frame" x="41" y="20" width="238" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" clearButtonMode="whileEditing" id="3dp-eo-Ttx">
<rect key="frame" x="41" y="62" width="238" height="30"/>
<rect key="frame" x="41" y="49" width="238" height="30"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
@ -475,7 +474,7 @@
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" clearButtonMode="whileEditing" id="Xbo-6Y-oaF">
<rect key="frame" x="41" y="129" width="238" height="30"/>
<rect key="frame" x="41" y="116" width="238" height="30"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
@ -485,15 +484,15 @@
</connections>
</textField>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Description" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Q1-60-Pap">
<rect key="frame" x="41" y="100" width="238" height="21"/>
<rect key="frame" x="41" y="87" width="238" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="VbD-YA-2wz">
<rect key="frame" x="41" y="324" width="238" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<rect key="frame" x="41" y="173" width="238" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Add">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
@ -507,8 +506,8 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="yxd-sd-V5K">
<rect key="frame" x="41" y="375" width="238" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="41" y="397" width="238" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Cancel">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
@ -547,8 +546,8 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="j9Z-GN-xos">
<rect key="frame" x="20" y="5" width="280" height="41"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="20" y="5" width="280" height="45"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<attributedString key="attributedText">
<fragment content="Verb">
<attributes>
@ -562,7 +561,7 @@
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" id="GwC-Bf-HXP">
<rect key="frame" x="20" y="129" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal">
<attributedString key="attributedTitle">
@ -581,7 +580,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" id="SQD-lH-VYW">
<rect key="frame" x="20" y="180" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal">
<attributedString key="attributedTitle">
@ -599,7 +598,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" id="wjU-6t-8IW">
<rect key="frame" x="20" y="231" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal">
<attributedString key="attributedTitle">
@ -617,7 +616,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" id="oF7-P6-yi9">
<rect key="frame" x="20" y="282" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal">
<attributedString key="attributedTitle">
@ -635,7 +634,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9jU-k2-QRJ">
<rect key="frame" x="20" y="344" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<state key="normal" title="Next">
<color key="titleColor" red="0.19607843137254902" green="0.30980392156862746" blue="0.52156862745098043" alpha="1" colorSpace="calibratedRGB"/>
@ -650,7 +649,7 @@
</button>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="vIa-Z9-dQK">
<rect key="frame" x="20" y="89" width="280" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<attributedString key="attributedText">
<fragment content="Person">
<attributes>
@ -663,8 +662,8 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PQt-9o-rOa">
<rect key="frame" x="20" y="48" width="280" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="20" y="51" width="280" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<attributedString key="attributedText">
<fragment content="Label">
<attributes>
@ -700,16 +699,16 @@
<scene sceneID="DCT-R0-chn">
<objects>
<tableViewController id="x6z-xh-dlG" customClass="EspagramWordsInLessonViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="Jll-Rf-A8B">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="singleLineEtched" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="Jll-Rf-A8B">
<rect key="frame" x="0.0" y="64" width="320" height="416"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Word Cell" textLabel="yfB-Og-5Jh" detailTextLabel="rvl-9S-Hto" style="IBUITableViewCellStyleSubtitle" id="Sqf-Ft-s4X">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
<rect key="frame" x="0.0" y="46" width="320" height="46"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="43"/>
<rect key="frame" x="10" y="1" width="280" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yfB-Og-5Jh">
@ -815,7 +814,7 @@
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="Vb3-GT-rnP">
<rect key="frame" x="20" y="58" width="280" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
@ -824,15 +823,15 @@
</connections>
</textField>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Meaning" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6vS-Fn-ecI">
<rect key="frame" x="19" y="104" width="281" height="21"/>
<rect key="frame" x="19" y="96" width="281" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="uWD-v9-yqX">
<rect key="frame" x="20" y="133" width="280" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="19" y="125" width="280" height="30"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
@ -841,8 +840,8 @@
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="bSy-fb-UkH">
<rect key="frame" x="20" y="329" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<rect key="frame" x="20" y="176" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Add">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
@ -857,7 +856,7 @@
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="ee8-w6-lMx">
<rect key="frame" x="19" y="389" width="281" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Cancel">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
@ -908,6 +907,80 @@
<resources>
<image name="iPhoneIcon_Big.png" width="114" height="114"/>
</resources>
<classes>
<class className="CoreDataTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CoreDataTableViewController.h"/>
</class>
<class className="EspagramAddWordToLessonViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramAddWordToLessonViewController.h"/>
<relationships>
<relationship kind="action" name="addButtonPressed:"/>
<relationship kind="action" name="cancelButtonPressed:"/>
<relationship kind="outlet" name="addButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="cancelButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="meaningInputText" candidateClass="UITextField"/>
<relationship kind="outlet" name="meaningLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="wordInputText" candidateClass="UITextField"/>
<relationship kind="outlet" name="wordLabel" candidateClass="UILabel"/>
</relationships>
</class>
<class className="EspagramConjugationTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramConjugationTableViewController.h"/>
<relationships>
<relationship kind="outlet" name="verb" candidateClass="Verb"/>
</relationships>
</class>
<class className="EspagramLessonViewController" superclassName="CoreDataTableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramLessonViewController.h"/>
<relationships>
<relationship kind="action" name="addLessonButtonPressed:"/>
</relationships>
</class>
<class className="EspagramMainTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramMainTableViewController.h"/>
<relationships>
<relationship kind="outlet" name="aboutButton" candidateClass="UIBarButtonItem"/>
</relationships>
</class>
<class className="EspagramNewLessonViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramNewLessonViewController.h"/>
<relationships>
<relationship kind="action" name="cancelButtonPressed:"/>
<relationship kind="action" name="editingDidEnd:"/>
<relationship kind="outlet" name="addButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="cancelButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="descriptionLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="lessonDescriptionTextInput" candidateClass="UITextField"/>
<relationship kind="outlet" name="lessonNameTextInput" candidateClass="UITextField"/>
<relationship kind="outlet" name="nameLabel" candidateClass="UILabel"/>
</relationships>
</class>
<class className="EspagramTestViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramTestViewController.h"/>
<relationships>
<relationship kind="action" name="EditingDidEnd:" candidateClass="UITextField"/>
<relationship kind="action" name="answered:" candidateClass="UIButton"/>
<relationship kind="action" name="nextButtonPressed:"/>
<relationship kind="outlet" name="answer1Button" candidateClass="UIButton"/>
<relationship kind="outlet" name="answer2Button" candidateClass="UIButton"/>
<relationship kind="outlet" name="answer3Button" candidateClass="UIButton"/>
<relationship kind="outlet" name="answer4Button" candidateClass="UIButton"/>
<relationship kind="outlet" name="nextButton" candidateClass="UIButton"/>
<relationship kind="outlet" name="testedVerbLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="verbMeaningLable" candidateClass="UILabel"/>
<relationship kind="outlet" name="verbPersonLabel" candidateClass="UILabel"/>
</relationships>
</class>
<class className="EspagramWordsInLessonViewController" superclassName="CoreDataTableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramWordsInLessonViewController.h"/>
<relationships>
<relationship kind="action" name="AddButtonPressed:"/>
</relationships>
</class>
<class className="Verb" superclassName="NSManagedObject">
<source key="sourceIdentifier" type="project" relativePath="./Classes/Verb.h"/>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>

BIN
espagram117.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
espagram57.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB