iPad version
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
<array>
|
||||
<string>espagram57.png</string>
|
||||
<string>espagram117.png</string>
|
||||
<string>espagram72.png</string>
|
||||
<string>espagram144.png</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
@@ -37,11 +39,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2</string>
|
||||
<string>1.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.2</string>
|
||||
<string>1.3</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string></string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
@@ -49,7 +51,9 @@
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Abel Fokkinga</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>MainStoryboard</string>
|
||||
<string>EspagramiPhone</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>EspagramiPad</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
@@ -68,5 +72,12 @@
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
12
Espagram/Espagram.entitlements
Normal file
12
Espagram/Espagram.entitlements
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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>
|
||||
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
|
||||
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
<string>$(AppIdentifierPrefix)com.fokkinga.abel.Espagram</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
- (void) cancelAddingWord;
|
||||
|
||||
- (NSString *) searchWordMeaning:(NSString *)word;
|
||||
|
||||
@end
|
||||
|
||||
@interface EspagramAddWordToLessonViewController : UIViewController
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
[self resignFirstResponder];
|
||||
}
|
||||
|
||||
- (IBAction)verbEntered {
|
||||
self.meaningInputText.text = [self.dataSource searchWordMeaning:self.wordInputText.text];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)addButtonPressed:(id)sender {
|
||||
[self.dataSource addWord: self.wordInputText.text withMeaning:self.meaningInputText.text];
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "EspagramAppDelegate.h"
|
||||
#import "Appirater.h"
|
||||
|
||||
@implementation EspagramAppDelegate
|
||||
|
||||
@@ -104,6 +105,12 @@
|
||||
// Override point for customization after application launch.
|
||||
[self customizeAppearance];
|
||||
return YES;
|
||||
|
||||
// App rater
|
||||
[Appirater setAppId:@"587567966"];
|
||||
|
||||
[Appirater appLaunched:YES];
|
||||
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
@@ -121,6 +128,9 @@
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
|
||||
// App rater
|
||||
[Appirater appEnteredForeground:YES];
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
#import "CoreDataTableViewController.h"
|
||||
#import "Conjugator.h"
|
||||
#import "EspagramNewLessonViewController.h"
|
||||
#import "EspagramAddWordToLessonViewController.h"
|
||||
#import "Lesson.h"
|
||||
#import "Tense.h"
|
||||
|
||||
|
||||
@interface EspagramLessonViewController : CoreDataTableViewController <EspagramNewLessonDelegate>
|
||||
@interface EspagramLessonViewController : CoreDataTableViewController <EspagramAddWordToLessonViewControllerDelegate,EspagramNewLessonDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIManagedDocument * lessonsDatabase;
|
||||
@property (nonatomic, strong) Lesson * lesson;
|
||||
|
||||
@@ -16,22 +16,26 @@
|
||||
@interface EspagramLessonViewController ()
|
||||
|
||||
@property UITabBarController * tabBarController;
|
||||
@property (strong,nonatomic) UIPopoverController *myPopover;
|
||||
|
||||
@end
|
||||
|
||||
@implementation EspagramLessonViewController
|
||||
@implementation EspagramLessonViewController
|
||||
|
||||
@synthesize lessonsDatabase = _lessonsDatabase;
|
||||
@synthesize lesson = _lesson;
|
||||
@synthesize conjugator = _conjugator;
|
||||
@synthesize tense = _tense;
|
||||
@synthesize tabBarController;
|
||||
@synthesize tabBarController = _tabBarController;
|
||||
@synthesize myPopover = _myPopover;
|
||||
|
||||
|
||||
- (IBAction)AddButtonPressed:(id)sender {
|
||||
NSLog(@"Selected lesson %@", self.lesson.title);
|
||||
[self performSegueWithIdentifier:@"Add A Word To Lesson" sender:self];
|
||||
}
|
||||
|
||||
// Only reached on iPhone
|
||||
- (void) addWord:(NSString *)word withMeaning:(NSString *)meaning{
|
||||
if ( word ) {
|
||||
NSLog(@"Selected lesson %@", self.lesson.title);
|
||||
@@ -51,6 +55,16 @@
|
||||
|
||||
}
|
||||
|
||||
- (NSString *) searchWordMeaning:(NSString *)word
|
||||
{
|
||||
if ( word ) {
|
||||
Verb * v= [Verb searchWordMeaning:word usingLessonLanguage:self.lesson];
|
||||
return v.meaning;
|
||||
}
|
||||
return nil;
|
||||
};
|
||||
|
||||
// Only reached on iPhone
|
||||
- (void) cancelAddingWord{
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{ NSLog(@"Adding a word cancelled");
|
||||
}];
|
||||
@@ -62,10 +76,15 @@
|
||||
|
||||
- (void) addLesson:(NSString*)title withDescription:(NSString*) subTitle {
|
||||
|
||||
NSLog(@"Need to dismiss modal view controller");
|
||||
[[self presentedViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
NSLog(@"View controller dismissed");
|
||||
}];
|
||||
if ( self.myPopover ) {
|
||||
// On iPad. Dismiss the pop over
|
||||
[[self myPopover] dismissPopoverAnimated:TRUE];
|
||||
self.myPopover = nil;
|
||||
} else {
|
||||
// On iPhone
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
}];
|
||||
}
|
||||
|
||||
NSLog(@"database %@, context %@", self.lessonsDatabase,[self.lessonsDatabase managedObjectContext]);
|
||||
|
||||
@@ -75,10 +94,15 @@
|
||||
}
|
||||
|
||||
- (void) cancelLesson{
|
||||
NSLog(@"Cancel pressed, need to dismiss modal view controller");
|
||||
[[self presentedViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
NSLog(@"View controller dismissed");
|
||||
}];
|
||||
if ( self.myPopover ) {
|
||||
// On iPad. Dismiss the pop over
|
||||
[[self myPopover] dismissPopoverAnimated:TRUE];
|
||||
self.myPopover = nil;
|
||||
} else {
|
||||
// On iPhone
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +172,13 @@ didSelectViewController:(UIViewController *)viewController {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
self.title = NSLocalizedString(@"Lessons title",@"Lessons title");
|
||||
if ( self.splitViewController) {
|
||||
// self.title = NSLocalizedString([@"TENSE_" stringByAppendingString:self.tense.tense], nil);
|
||||
self.title = [self.tense getTenseInLanguage:[self.conjugator description]];
|
||||
} else {
|
||||
NSLocalizedString(@"Lessons title",@"Lessons title");
|
||||
}
|
||||
|
||||
|
||||
if (!self.lessonsDatabase) { // We'll create a default database if none is set
|
||||
|
||||
@@ -306,6 +336,11 @@ didSelectViewController:(UIViewController *)viewController {
|
||||
if ( [segue.identifier isEqualToString:@"Add new Lesson"]){
|
||||
NSLog(@"Preparing for segue Add new Lesson");
|
||||
[segue.destinationViewController setDataSource:self];
|
||||
|
||||
if ( self.splitViewController ) {
|
||||
// On iPad, we want to store the pointer to the popOver
|
||||
self.myPopover = [(UIStoryboardPopoverSegue *)segue popoverController];
|
||||
}
|
||||
}
|
||||
|
||||
if ( [segue.identifier isEqualToString:@"Add A Word To Lesson"]) {
|
||||
@@ -316,7 +351,8 @@ didSelectViewController:(UIViewController *)viewController {
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self performSegueWithIdentifier:@"Testing Tab Bar" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
|
||||
|
||||
[self performSegueWithIdentifier:@"Testing Tab Bar" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
|
||||
// [self performSegueWithIdentifier:@"Testing" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface EspagramMainTableViewController : UITableViewController
|
||||
@interface EspagramMainTableViewController : UITableViewController <UISplitViewControllerDelegate>
|
||||
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIBarButtonItem *aboutButton;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#import "SpanishConjugator.h"
|
||||
#import "EspagramTestViewController.h"
|
||||
#import "EspagramLessonViewController.h"
|
||||
#import "SplitViewBarButtonItemPresenter.h"
|
||||
|
||||
@interface EspagramMainTableViewController ()
|
||||
@property (nonatomic, strong) NSString *language, *displayTitle;
|
||||
@@ -35,6 +36,46 @@
|
||||
}
|
||||
|
||||
|
||||
- (void)awakeFromNib // always try to be the split view's delegate
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.splitViewController.delegate = self;
|
||||
}
|
||||
|
||||
- (id <SplitViewBarButtonItemPresenter>)splitViewBarButtonItemPresenter
|
||||
{
|
||||
id detailVC = [self.splitViewController.viewControllers lastObject];
|
||||
if (![detailVC conformsToProtocol:@protocol(SplitViewBarButtonItemPresenter)]) {
|
||||
detailVC = nil;
|
||||
}
|
||||
return detailVC;
|
||||
}
|
||||
|
||||
- (BOOL)splitViewController:(UISplitViewController *)svc
|
||||
shouldHideViewController:(UIViewController *)vc
|
||||
inOrientation:(UIInterfaceOrientation)orientation
|
||||
{
|
||||
return NO;
|
||||
//return [self splitViewBarButtonItemPresenter] ? UIInterfaceOrientationIsPortrait(orientation) : NO;
|
||||
}
|
||||
|
||||
- (void)splitViewController:(UISplitViewController *)svc
|
||||
willHideViewController:(UIViewController *)aViewController
|
||||
withBarButtonItem:(UIBarButtonItem *)barButtonItem
|
||||
forPopoverController:(UIPopoverController *)pc
|
||||
{
|
||||
barButtonItem.title = self.title;
|
||||
[self splitViewBarButtonItemPresenter].splitViewBarButtonItem = barButtonItem;
|
||||
}
|
||||
|
||||
- (void)splitViewController:(UISplitViewController *)svc
|
||||
willShowViewController:(UIViewController *)aViewController
|
||||
invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
|
||||
{
|
||||
[self splitViewBarButtonItemPresenter].splitViewBarButtonItem = nil;
|
||||
}
|
||||
|
||||
|
||||
# pragma mark - Espagram setters and getters
|
||||
|
||||
- (id <Conjugator>) getLanguage {
|
||||
@@ -136,10 +177,21 @@
|
||||
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"];
|
||||
NSString *languageCode = [[NSLocale preferredLanguages] objectAtIndex:0];
|
||||
if ([languageCode isEqualToString:@"en"]) {
|
||||
NSLog(@"Default DB is EN");
|
||||
defaultStorePath = [[NSBundle mainBundle] pathForResource:@"Default Espagram database EN" ofType:@"sqlite"];
|
||||
}else if ([languageCode isEqualToString:@"nl"]) {
|
||||
NSLog(@"Default DB is NL");
|
||||
defaultStorePath = [[NSBundle mainBundle] pathForResource:@"Default Espagram database NL" ofType:@"sqlite"];
|
||||
}else if ([languageCode isEqualToString:@"de"]) {
|
||||
NSLog(@"Default DB is DE");
|
||||
defaultStorePath = [[NSBundle mainBundle] pathForResource:@"Default Espagram database DE" ofType:@"sqlite"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( [fileManager fileExistsAtPath:defaultStorePath]) {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *descriptionLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *addButton;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *cancelButton;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
@implementation EspagramNewLessonViewController
|
||||
|
||||
@synthesize nameLabel = _nameLabel;
|
||||
@synthesize titleLabel = _titleLabel;
|
||||
@synthesize descriptionLabel = _descriptionLabel;
|
||||
@synthesize addButton = _addButton;
|
||||
@synthesize lessonDescriptionTextInput = _lessonDescriptionTextInput;
|
||||
@@ -39,11 +40,12 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
self.titleLabel.text = NSLocalizedString( @"Add a new lesson",@"Add a new lesson (long description)");
|
||||
|
||||
self.nameLabel.text = NSLocalizedString(@"Lesson title", @"Lesson title when adding a new lesson");
|
||||
self.descriptionLabel.text = NSLocalizedString(@"Description", @"Lesson description when adding a new lesson");
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *verbPersonLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *verbTestTenseLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *answer1Button;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *answer2Button;
|
||||
@@ -32,5 +34,8 @@
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *nextButton;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIProgressView *testProgressIndicator;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *testStatusLabel;
|
||||
|
||||
@end
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
@synthesize testedVerbLabel = _testedVerbLabel;
|
||||
@synthesize verbMeaningLable = _testedVerbLable;
|
||||
@synthesize verbPersonLabel = _verbPersonLabel;
|
||||
@synthesize verbTestTenseLabel = _verbTestTenseLabel;
|
||||
@synthesize answer1Button = _answer1Button;
|
||||
@synthesize answer2Button = _answer2Button;
|
||||
@synthesize answer3Button = _answer3Button;
|
||||
@@ -34,6 +35,8 @@
|
||||
@synthesize currentVerb = _currentVerb;
|
||||
@synthesize correctAnswersInCurrentSet = _correctAnswersInCurrentSet;
|
||||
@synthesize wrongAnswersInCurrentSet = _wrongAnswersInCurrentSet;
|
||||
@synthesize testProgressIndicator = _testProgressIndicator;
|
||||
@synthesize testStatusLabel = _testStatusLabel;
|
||||
|
||||
|
||||
- (NSMutableArray *)testSet{
|
||||
@@ -46,6 +49,18 @@
|
||||
return _testSet;
|
||||
};
|
||||
|
||||
- (void) updateTestProgress
|
||||
{
|
||||
if ( self.testSet.count == 0 ) {
|
||||
self.testProgressIndicator.progress = 0;
|
||||
} else {
|
||||
self.testProgressIndicator.progress = self.correctAnswersInCurrentSet * 1.0 / (self.testSet.count + self.correctAnswersInCurrentSet);
|
||||
}
|
||||
|
||||
self.testStatusLabel.text = [NSString stringWithFormat:@"%@: %d %@: %d %@: %d",NSLocalizedString(@"Correct",@"Number of correct answers"),self.correctAnswersInCurrentSet,
|
||||
NSLocalizedString(@"Error",@"Number of incorrect answers"),self.wrongAnswersInCurrentSet,
|
||||
NSLocalizedString(@"Total",@"Number of total conjugations in test"),self.testSet.count+self.correctAnswersInCurrentSet];
|
||||
}
|
||||
|
||||
- (IBAction)answered:(UIButton *)sender {
|
||||
|
||||
@@ -75,9 +90,31 @@
|
||||
return lastObject;
|
||||
}
|
||||
|
||||
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if (buttonIndex == 0) {
|
||||
NSLog(@"user pressed Continue");
|
||||
}
|
||||
else {
|
||||
NSLog(@"user pressed Cancel");
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)nextButtonPressed:(id)sender {
|
||||
|
||||
[self.testSet removeLastObject];
|
||||
if ( self.testSet.count == 1 &&
|
||||
self.correctAnswersInCurrentSet > 0 &&
|
||||
self.currentVerb.failed == false) {
|
||||
|
||||
//Create UIAlertView alert
|
||||
UIAlertView *alert = [[UIAlertView alloc]
|
||||
initWithTitle:NSLocalizedString(@"Congratulations",@"Congratulations title")
|
||||
message:NSLocalizedString(@"You succesfully completed this lesson!",@"Lesson completed succesfully message")
|
||||
delegate:self
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",@"Quit lesson completed completed alert message") otherButtonTitles: nil];
|
||||
|
||||
// Show alert
|
||||
[alert show];
|
||||
}
|
||||
|
||||
[self nextVerb];
|
||||
}
|
||||
@@ -124,22 +161,26 @@
|
||||
// Add test result
|
||||
if ( self.currentVerb) {
|
||||
[TestResult addTestableVerbResult:self.currentVerb withTestType:@"Multiple Choice"];
|
||||
|
||||
if ( self.currentVerb.failed) {
|
||||
// Last test failed.. so we won't remove it
|
||||
// instead we shuffle the test set.
|
||||
self.currentVerb.failed = false;
|
||||
[self.testSet shuffle];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.wrongAnswersInCurrentSet += 1;
|
||||
} else {
|
||||
// Last verb answered correctly
|
||||
[self.testSet removeLastObject];
|
||||
|
||||
// increase correct answered counter
|
||||
self.correctAnswersInCurrentSet += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( self.currentVerb && self.currentVerb.failed) {
|
||||
// Last test failed.. so we won't remove it
|
||||
// instead we shuffle the test set.
|
||||
[self.testSet shuffle];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.wrongAnswersInCurrentSet += 1;
|
||||
} {
|
||||
// Last verb answered correctly
|
||||
[self.testSet lastObject];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.correctAnswersInCurrentSet += 1;
|
||||
}
|
||||
// Update progress indicator
|
||||
[self updateTestProgress];
|
||||
|
||||
self.currentVerb = self.testSet.lastObject;
|
||||
|
||||
@@ -185,6 +226,8 @@
|
||||
|
||||
self.title = NSLocalizedString(@"Multiple Choice",@"Multiple Choice test");
|
||||
|
||||
self.verbTestTenseLabel.text = [self.lesson getLocalizedTense];
|
||||
|
||||
self.nextButton.titleLabel.text = NSLocalizedString(@"Next", @"Next button in the testing screen to continue to the next verb");
|
||||
|
||||
[self.nextButton setTitle:NSLocalizedString(@"Next", @"Next button in the testing screen to continue to the next verb") forState:UIControlStateNormal];
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *verbPersonLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *verbTestTenseLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *nextButton;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *checkAnswerButton;
|
||||
@@ -31,4 +33,8 @@
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField *verbAnswerTextField;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIProgressView *testProgressIndicator;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *testStatusLabel;
|
||||
|
||||
@end
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
@synthesize currentVerb = _currentVerb;
|
||||
@synthesize correctAnswersInCurrentSet = _correctAnswersInCurrentSet;
|
||||
@synthesize wrongAnswersInCurrentSet = _wrongAnswersInCurrentSet;
|
||||
|
||||
@synthesize verbTestTenseLabel = _verbTestTenseLabel;
|
||||
@synthesize testProgressIndicator = _testProgressIndicator;
|
||||
@synthesize testStatusLabel = _testStatusLabel;
|
||||
|
||||
- (NSMutableArray *)testSet{
|
||||
// Check if there are any verbs in the set
|
||||
@@ -45,6 +47,29 @@
|
||||
return _testSet;
|
||||
};
|
||||
|
||||
- (void) updateTestProgress
|
||||
{
|
||||
if ( self.testSet.count == 0 ) {
|
||||
self.testProgressIndicator.progress = 0;
|
||||
} else {
|
||||
self.testProgressIndicator.progress = self.correctAnswersInCurrentSet * 1.0 / (self.testSet.count + self.correctAnswersInCurrentSet);
|
||||
}
|
||||
|
||||
self.testStatusLabel.text = [NSString stringWithFormat:@"%@: %d %@: %d %@: %d",NSLocalizedString(@"Correct",@"Number of correct answers"),self.correctAnswersInCurrentSet,
|
||||
NSLocalizedString(@"Error",@"Number of incorrect answers"),self.wrongAnswersInCurrentSet,
|
||||
NSLocalizedString(@"Total",@"Number of total conjugations in test"),self.testSet.count+self.correctAnswersInCurrentSet];
|
||||
}
|
||||
|
||||
- (void)setLesson:(Lesson *)lesson{
|
||||
if ( _lesson != lesson){
|
||||
// Clear current test set
|
||||
self.testSet = nil;
|
||||
// set Tense label
|
||||
self.verbTestTenseLabel.text = [self.lesson getLocalizedTense];
|
||||
_lesson = lesson;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setUIButtonTitle:(UIButton *)button withText:(NSString *) titleString inColour:(UIColor *) colour forState:(UIControlState)controlState
|
||||
{
|
||||
NSAttributedString *title;
|
||||
@@ -72,6 +97,7 @@
|
||||
|
||||
|
||||
- (void) checkAnswer:(NSString *) answer {
|
||||
|
||||
NSString * correctAnswer = [self.lesson.getConjugationEngine conjugateVerb:self.currentVerb.verb.verb inPerson:self.currentVerb.person andTense:[self.lesson getTenseAsTense]];
|
||||
|
||||
|
||||
@@ -93,25 +119,29 @@
|
||||
// Add test result
|
||||
if ( self.currentVerb) {
|
||||
[TestResult addTestableVerbResult:self.currentVerb withTestType:@"Typing"];
|
||||
}
|
||||
|
||||
if ( self.currentVerb.failed) {
|
||||
// Last test failed.. so we won't remove it
|
||||
// instead we shuffle the test set.
|
||||
self.currentVerb.failed = false;
|
||||
[self.testSet shuffle];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.wrongAnswersInCurrentSet += 1;
|
||||
} else {
|
||||
// Last verb answered correctly
|
||||
[self.testSet removeLastObject];
|
||||
|
||||
// increase correct answered counter
|
||||
self.correctAnswersInCurrentSet += 1;
|
||||
}
|
||||
|
||||
if ( self.currentVerb && self.currentVerb.failed) {
|
||||
// Last test failed.. so we won't remove it
|
||||
// instead we shuffle the test set.
|
||||
[self.testSet shuffle];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.wrongAnswersInCurrentSet += 1;
|
||||
} {
|
||||
// Last verb answered correctly
|
||||
[self.testSet lastObject];
|
||||
|
||||
// increase wrongly answered counter
|
||||
self.correctAnswersInCurrentSet += 1;
|
||||
}
|
||||
|
||||
self.currentVerb = self.testSet.lastObject;
|
||||
|
||||
// Update progress indicator
|
||||
[self updateTestProgress];
|
||||
|
||||
if ( self.currentVerb) {
|
||||
|
||||
@@ -121,6 +151,7 @@
|
||||
|
||||
NSLog(@"Correct answer: %@", correctAnswer);
|
||||
|
||||
|
||||
// Set display label to verb to test
|
||||
[self setUILabelTitle:self.testedVerbLabel withText:self.currentVerb.verb.verb inColour:[UIColor blackColor] andSize:30];
|
||||
|
||||
@@ -152,8 +183,22 @@
|
||||
}
|
||||
|
||||
- (IBAction)nextButtonPressed:(id)sender {
|
||||
|
||||
[self.testSet removeLastObject];
|
||||
|
||||
if ( self.testSet.count == 1 &&
|
||||
self.correctAnswersInCurrentSet > 0 &&
|
||||
self.currentVerb.failed == false) {
|
||||
|
||||
//Create UIAlertView alert
|
||||
UIAlertView *alert = [[UIAlertView alloc]
|
||||
initWithTitle:NSLocalizedString(@"Congratulations",@"Congratulations title")
|
||||
message:NSLocalizedString(@"You succesfully completed this lesson!",@"Lesson completed succesfully message")
|
||||
delegate:self
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",@"Quit lesson completed completed alert message") otherButtonTitles: nil];
|
||||
|
||||
// Show alert
|
||||
[alert show];
|
||||
}
|
||||
|
||||
[self nextVerb];
|
||||
self.verbAnswerTextField.text = @"";
|
||||
}
|
||||
@@ -174,7 +219,9 @@
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
self.title = NSLocalizedString(@"Typing",@"Typing Test");
|
||||
|
||||
|
||||
self.verbTestTenseLabel.text = [self.lesson getLocalizedTense];
|
||||
|
||||
self.nextButton.titleLabel.text = NSLocalizedString(@"Next", @"Next button in the testing screen to continue to the next verb");
|
||||
|
||||
[self.nextButton setTitle:NSLocalizedString(@"Next", @"Next button in the testing screen to continue to the next verb") forState:UIControlStateNormal];
|
||||
|
||||
@@ -11,12 +11,14 @@
|
||||
#import "Verb+Create.h"
|
||||
|
||||
@interface EspagramWordsInLessonViewController ()
|
||||
@property (strong,nonatomic) UIPopoverController *myPopover;
|
||||
@end
|
||||
|
||||
@implementation EspagramWordsInLessonViewController
|
||||
|
||||
@synthesize lesson = _lesson;
|
||||
@synthesize delegate = _delegate;
|
||||
@synthesize myPopover = _myPopover;
|
||||
|
||||
|
||||
- (IBAction)AddButtonPressed:(id)sender {
|
||||
@@ -27,14 +29,46 @@
|
||||
if ( word ) {
|
||||
[Verb addVerb:word andMeaning:meaning toLesson:self.lesson];
|
||||
}
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
NSLog(@"Word added");
|
||||
|
||||
if ( self.myPopover ) {
|
||||
// On iPad. Dismiss the pop over
|
||||
[[self myPopover] dismissPopoverAnimated:TRUE];
|
||||
self.myPopover = nil;
|
||||
} else {
|
||||
// On iPhone
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{
|
||||
}];
|
||||
}
|
||||
if ( self.lesson.verbs.count > 0 && self.tabBarController ) {
|
||||
// Words in lesson, enable tabs
|
||||
NSArray *tabItems = self.tabBarController.tabBar.items;
|
||||
for (UIBarItem *tabItem in tabItems)
|
||||
{
|
||||
[tabItem setEnabled:true];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *) searchWordMeaning:(NSString *)word
|
||||
{
|
||||
if ( word ) {
|
||||
Verb * v= [Verb searchWordMeaning:word usingLessonLanguage:self.lesson];
|
||||
return v.meaning;
|
||||
}
|
||||
return nil;
|
||||
};
|
||||
|
||||
- (void) cancelAddingWord{
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{ NSLog(@"Adding a word cancelled");
|
||||
}];
|
||||
|
||||
if ( self.myPopover ) {
|
||||
// On iPad, Dismiss the pop over
|
||||
[[self myPopover] dismissPopoverAnimated:TRUE];
|
||||
self.myPopover = nil;
|
||||
} else {
|
||||
// On iPhone
|
||||
[[self parentViewController] dismissViewControllerAnimated:TRUE completion:^{ NSLog(@"Adding a word cancelled");
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupFetchedResultsController // attaches an NSFetchRequest to this UITableViewController
|
||||
@@ -46,7 +80,6 @@
|
||||
|
||||
request.predicate = [NSCompoundPredicate andPredicateWithSubpredicates:[NSArray arrayWithObjects:[NSPredicate predicateWithFormat:@"lesson.title = %@", self.lesson.title], [NSPredicate predicateWithFormat:@"lesson.tense = %@", self.lesson.tense], [NSPredicate predicateWithFormat:@"lesson.conjugator = %@", self.lesson.conjugator],nil]];
|
||||
|
||||
|
||||
self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request
|
||||
managedObjectContext:self.lesson.managedObjectContext
|
||||
sectionNameKeyPath:nil
|
||||
@@ -100,6 +133,11 @@
|
||||
return les;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return [[[self.fetchedResultsController sections] objectAtIndex:section] numberOfObjects] + 1;
|
||||
}
|
||||
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
@@ -107,9 +145,15 @@
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
|
||||
|
||||
// Configure the cell...
|
||||
Verb * verb = [self.fetchedResultsController objectAtIndexPath:indexPath];
|
||||
cell.textLabel.text = verb.verb;
|
||||
cell.detailTextLabel.text = verb.meaning;
|
||||
if ( indexPath.row + 1 > [[[self.fetchedResultsController sections] objectAtIndex:indexPath.section] numberOfObjects]){
|
||||
cell.textLabel.text = NSLocalizedString(@"Add new...",@"Add a new verb (short description)");
|
||||
cell.detailTextLabel.text = NSLocalizedString(@"Add a new verb",@"Add a new verb (long description)");
|
||||
} else {
|
||||
Verb * verb = [self.fetchedResultsController objectAtIndexPath:indexPath];
|
||||
cell.textLabel.text = verb.verb;
|
||||
cell.detailTextLabel.text = verb.meaning;
|
||||
}
|
||||
|
||||
|
||||
return cell;
|
||||
}
|
||||
@@ -117,8 +161,14 @@
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
||||
{
|
||||
|
||||
if ( [segue.identifier isEqualToString:@"Add A Word To Lesson"]) {
|
||||
[segue.destinationViewController setDataSource:self];
|
||||
|
||||
if ( self.splitViewController ) {
|
||||
// On iPad, we want to store the pointer to the popOver
|
||||
self.myPopover = [(UIStoryboardPopoverSegue *)segue popoverController];
|
||||
}
|
||||
}
|
||||
|
||||
if ( [segue.identifier isEqualToString:@"Conjugate"]) {
|
||||
@@ -127,6 +177,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSLog(@"selected verb %@",[[[self.tableView cellForRowAtIndexPath:indexPath] textLabel] text ]);
|
||||
if ( [[[[self.tableView cellForRowAtIndexPath:indexPath] textLabel] text] isEqualToString:NSLocalizedString(@"Add new...",@"Add a new verb (short description)")] ) {
|
||||
[self performSegueWithIdentifier:@"Add A Word To Lesson" sender:self];
|
||||
} else {
|
||||
[self performSegueWithIdentifier:@"Conjugate" sender:indexPath];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Override to support conditional editing of the table view.
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
@@ -136,7 +196,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Override to support editing the table view.
|
||||
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
@@ -171,9 +230,4 @@
|
||||
|
||||
#pragma mark - Table view delegate
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self performSegueWithIdentifier:@"Conjugate" sender:indexPath];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
1329
Espagram/EspagramiPad.storyboard
Normal file
1329
Espagram/EspagramiPad.storyboard
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,4 +18,6 @@
|
||||
|
||||
- (NSString *) getTenseName;
|
||||
|
||||
- (NSString *) getLocalizedTense;
|
||||
|
||||
@end
|
||||
|
||||
@@ -34,4 +34,9 @@
|
||||
return [tense getTenseInLanguage:self.conjugator];
|
||||
}
|
||||
|
||||
- (NSString *) getLocalizedTense;
|
||||
{
|
||||
return NSLocalizedString([@"TENSE_" stringByAppendingString:self.tense], nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -30,28 +30,49 @@
|
||||
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]];
|
||||
initWithObjects:@"Presente de Indicativo",@"Simple present",@"Tegenwoordige tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"PRESENT_SUBJUNCTIVE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Presente de Subjuntivo",@"Present subjunctive",@"Aanvoegende wijs",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]];
|
||||
initWithObjects:@"Pretérito 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:@"IMPERFECT_SUBJUNCTIVE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Imperfecto de Subjuntivo",@"Imperfect subjunctive",@"Onvoltooid aanvoegende wijs",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]];
|
||||
initWithObjects:@"Pretérito Perfecto",@"Present perfect",@"Voltooid tegenwoordige tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
if ( [self.tense isEqualToString:@"PERFECT_SUBJUNCTIVE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Perfecto de Subjuntivo",@"Present perfect subjunctive",@"Voltooid aanvoegende wijs",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]];
|
||||
initWithObjects:@"Pluscuamperfecto",@"Past perfect",@"Voltooid verleden tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
|
||||
if ( [self.tense isEqualToString:@"PAST_PERFECT_SUBJUNCTIVE"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Pluscuamperfecto Subjuntivo",@"Past perfect subjunctive",@"Voltooid verleden aanvoegende wijs",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]];
|
||||
initWithObjects:@"Futuro perfecto",@"Future perfect",@"Voltooid tegenwoordige toekomende tijd",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]];
|
||||
initWithObjects:@"Condicional",@"Conditional",@"Onvoltooid verleden toekomende tijd",nil] forKeys:[[NSArray alloc] initWithObjects:@"Spanish",@"English",@"Dutch", nil]];
|
||||
|
||||
if ( [self.tense isEqualToString:@"CONDITIONAL_PERFECT"])
|
||||
_text = [[NSDictionary alloc] initWithObjects:[[NSArray alloc]
|
||||
initWithObjects:@"Condicional Perfecto",@"Conditional Perfect",@"Voltooid verleden toekomende tijd",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]];
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
@interface Verb (Create)
|
||||
|
||||
+ (void) addVerb:(NSString *)newVerb andMeaning:(NSString *)meaning toLesson:(Lesson *)lesson;
|
||||
+ (Verb *) searchWordMeaning:(NSString *)verb usingLessonLanguage:(Lesson *)lesson;
|
||||
|
||||
@end
|
||||
|
||||
@@ -60,4 +60,27 @@
|
||||
[[lesson managedObjectContext] save:nil];
|
||||
};
|
||||
|
||||
+ (Verb *) searchWordMeaning:(NSString *)verb usingLessonLanguage:(Lesson *)lesson
|
||||
{
|
||||
|
||||
NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"Verb"];
|
||||
|
||||
|
||||
// Where clause
|
||||
request.predicate = [NSCompoundPredicate andPredicateWithSubpredicates:[NSArray arrayWithObjects:[NSPredicate predicateWithFormat:@"verb = %@", verb],
|
||||
[NSPredicate predicateWithFormat:@"meaning != nil AND meaning !=''"],
|
||||
[NSPredicate predicateWithFormat:@"lesson.conjugator = %@", lesson.conjugator],nil]];
|
||||
|
||||
|
||||
|
||||
NSError *error = nil;
|
||||
NSArray *verbs = [[lesson managedObjectContext] executeFetchRequest:request error:&error];
|
||||
|
||||
if ( verbs && verbs.count > 0 ){
|
||||
return [verbs lastObject];
|
||||
}
|
||||
|
||||
return nil;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
BIN
Espagram/de.lproj/Localizable.strings
Normal file
BIN
Espagram/de.lproj/Localizable.strings
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="oPi-YX-voa">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="oPi-YX-voa">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Espagram Main Table View Controller - Espagram-->
|
||||
@@ -104,8 +104,8 @@
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="TENSE_PRESENT_PERFECT_SUBJUNCTIVE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ICg-tz-BYA">
|
||||
<rect key="frame" x="10" y="24" width="260" height="18"/>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="TENSE_PERFECT_SUBJUNCTIVE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ICg-tz-BYA">
|
||||
<rect key="frame" x="10" y="24" width="225" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
|
||||
@@ -635,7 +635,7 @@
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="gHf-EZ-b4O" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="979" y="-1015"/>
|
||||
<point key="canvasLocation" x="961" y="-959"/>
|
||||
</scene>
|
||||
<!--Espagram Test View Controller - Multiple Choice-->
|
||||
<scene sceneID="lbJ-Av-XmM">
|
||||
@@ -660,8 +660,8 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</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="109" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="20" y="109" width="280" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal">
|
||||
<attributedString key="attributedTitle">
|
||||
@@ -679,8 +679,8 @@
|
||||
</connections>
|
||||
</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="160" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="20" y="153" width="280" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal">
|
||||
<attributedString key="attributedTitle">
|
||||
@@ -697,8 +697,8 @@
|
||||
</connections>
|
||||
</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="211" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="20" y="197" width="280" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal">
|
||||
<attributedString key="attributedTitle">
|
||||
@@ -715,8 +715,8 @@
|
||||
</connections>
|
||||
</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="262" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="20" y="241" width="280" height="37"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<state key="normal">
|
||||
<attributedString key="attributedTitle">
|
||||
@@ -733,7 +733,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9jU-k2-QRJ">
|
||||
<rect key="frame" x="20" y="313" width="280" height="44"/>
|
||||
<rect key="frame" x="20" y="285" width="280" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<state key="normal" title="Next">
|
||||
@@ -749,7 +749,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="74" width="280" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="Person">
|
||||
<attributes>
|
||||
@@ -775,6 +775,11 @@
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" progress="0.5" id="fMh-We-UbK">
|
||||
<rect key="frame" x="20" y="336" width="280" height="9"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<color key="progressTintColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.92037779090000005" green="0.84682043169999999" blue="0.62681043489999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
@@ -786,6 +791,7 @@
|
||||
<outlet property="answer3Button" destination="wjU-6t-8IW" id="XJK-0e-Vd6"/>
|
||||
<outlet property="answer4Button" destination="oF7-P6-yi9" id="tLQ-6O-sUs"/>
|
||||
<outlet property="nextButton" destination="9jU-k2-QRJ" id="AXC-IX-fmp"/>
|
||||
<outlet property="testProgressIndicator" destination="fMh-We-UbK" id="f1y-Ji-Z5h"/>
|
||||
<outlet property="testedVerbLabel" destination="j9Z-GN-xos" id="bip-se-GgG"/>
|
||||
<outlet property="verbMeaningLable" destination="PQt-9o-rOa" id="Ph8-yR-0kJ"/>
|
||||
<outlet property="verbPersonLabel" destination="vIa-Z9-dQK" id="iEb-LC-wQb"/>
|
||||
@@ -794,7 +800,7 @@
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="3Kf-gx-xfq" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="979" y="-293"/>
|
||||
<point key="canvasLocation" x="990" y="-311"/>
|
||||
</scene>
|
||||
<!--Tab Bar Controller-->
|
||||
<scene sceneID="lCz-RG-hnO">
|
||||
@@ -861,7 +867,7 @@
|
||||
<navigationItem key="navigationItem" title="Words" id="Fdg-5d-vck">
|
||||
<barButtonItem key="rightBarButtonItem" systemItem="add" id="G74-V1-sDK">
|
||||
<connections>
|
||||
<action selector="AddButtonPressed:" destination="x6z-xh-dlG" id="jhx-3C-Shi"/>
|
||||
<action selector="AddButtonPressed:" destination="x6z-xh-dlG" id="qUD-IE-TjZ"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
@@ -897,7 +903,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="tHV-ju-jYt">
|
||||
<rect key="frame" x="20" y="309" width="285" height="44"/>
|
||||
<rect key="frame" x="20" y="284" width="285" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<state key="normal" title="Next">
|
||||
@@ -967,7 +973,7 @@
|
||||
</connections>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="oky-Ng-qk8">
|
||||
<rect key="frame" x="20" y="258" width="285" height="44"/>
|
||||
<rect key="frame" x="20" y="233" width="285" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<state key="normal" title="Answer">
|
||||
@@ -1056,6 +1062,11 @@
|
||||
<action selector="addAccentedCharacter:" destination="QXI-XP-mxq" eventType="touchUpInside" id="XmZ-lR-J0G"/>
|
||||
</connections>
|
||||
</button>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" progress="0.5" id="aIY-Iq-FoL">
|
||||
<rect key="frame" x="20" y="343" width="285" height="9"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<color key="progressTintColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.92037779090000005" green="0.84682043169999999" blue="0.62681043489999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
@@ -1064,6 +1075,7 @@
|
||||
<outlet property="checkAnswerButton" destination="b2m-pe-KH3" id="0pW-Ve-813"/>
|
||||
<outlet property="nextButton" destination="tHV-ju-jYt" id="8t1-fM-Vz5"/>
|
||||
<outlet property="showAnswerButton" destination="oky-Ng-qk8" id="9md-2e-34Z"/>
|
||||
<outlet property="testProgressIndicator" destination="aIY-Iq-FoL" id="WmR-IG-GKI"/>
|
||||
<outlet property="testedVerbLabel" destination="e4v-C6-jif" id="TDn-20-RqB"/>
|
||||
<outlet property="verbAnswerTextField" destination="6Qr-xM-8Dq" id="yLu-M9-ntI"/>
|
||||
<outlet property="verbMeaningLable" destination="h2R-hV-w1C" id="oVD-2J-PhT"/>
|
||||
@@ -1141,8 +1153,8 @@
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<action selector="editingDidEnd" destination="jQ9-yg-o3d" eventType="editingDidEnd" id="hfX-ck-gqI"/>
|
||||
<action selector="editingDidEnd" destination="jQ9-yg-o3d" eventType="editingDidEndOnExit" id="ock-u2-SwF"/>
|
||||
<action selector="verbEntered" destination="jQ9-yg-o3d" eventType="editingDidEnd" id="Omh-Ps-Oee"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Meaning" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6vS-Fn-ecI">
|
||||
@@ -1233,85 +1245,6 @@
|
||||
<image name="tabbar_list.png" width="21" height="21"/>
|
||||
<image name="tabbar_typing.png" width="21" height="21"/>
|
||||
</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="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"/>
|
||||
</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="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="EspagramTypingTestViewController" superclassName="UIViewController">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/EspagramTypingTestViewController.h"/>
|
||||
<relationships>
|
||||
<relationship kind="action" name="addAccentedCharacter:" candidateClass="UIButton"/>
|
||||
<relationship kind="action" name="answerEntered:"/>
|
||||
<relationship kind="action" name="nextButtonPressed:"/>
|
||||
<relationship kind="action" name="showCorrectAnswerButtonPressed:"/>
|
||||
<relationship kind="outlet" name="checkAnswerButton" candidateClass="UIButton"/>
|
||||
<relationship kind="outlet" name="nextButton" candidateClass="UIButton"/>
|
||||
<relationship kind="outlet" name="showAnswerButton" candidateClass="UIButton"/>
|
||||
<relationship kind="outlet" name="testedVerbLabel" candidateClass="UILabel"/>
|
||||
<relationship kind="outlet" name="verbAnswerTextField" candidateClass="UITextField"/>
|
||||
<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"/>
|
||||
</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"/>
|
||||
Binary file not shown.
Binary file not shown.
@@ -54,6 +54,33 @@
|
||||
/* Show correct answer button */
|
||||
"Answer" = "Antwoord?";
|
||||
|
||||
/* Add a new verb (short description) */
|
||||
"Add new..." = "Nieuw...";
|
||||
|
||||
/* Add a new verb (long description) */
|
||||
"Add a new verb" = "Voeg een nieuw werkwoord toe";
|
||||
|
||||
/* Add a new lesson (long description) */
|
||||
"Add a new lesson" = "Nieuwe les toevoegen";
|
||||
|
||||
/* Number of correct answers */
|
||||
"Correct" = "Correct";
|
||||
|
||||
/* Number of incorrect answers */
|
||||
"Error" = "Fout";
|
||||
|
||||
/* Number of total conjugations in test */
|
||||
"Total" = "Totaal";
|
||||
|
||||
/* Congratulations title */
|
||||
"Congratulations" = "Gefeliciteerd";
|
||||
|
||||
/* Lesson completed succesfully message */
|
||||
"You succesfully completed this lesson!" = "Je hebt deze les succesvol afgerond!";
|
||||
|
||||
/* Quit lesson completed completed alert message */
|
||||
"Continue" = "Verder";
|
||||
|
||||
/* Simple present tense description */
|
||||
"TENSE_SIMPLE_PRESENT" = "Tegenwoordige tijd";
|
||||
|
||||
@@ -91,7 +118,7 @@
|
||||
"TENSE_PRESENT_SUBJUNCTIVE" = "Aanvoegende wijs";
|
||||
|
||||
/* Present subjunctive tense description */
|
||||
"TENSE_PRESENT_PERFECT_SUBJUNCTIVE" = "Voltooid aanvoegende wijs";
|
||||
"TENSE_PERFECT_SUBJUNCTIVE" = "Voltooid aanvoegende wijs";
|
||||
|
||||
/* Present perfect subjunctive tense description */
|
||||
"TENSE_IMPERFECT_SUBJUNCTIVE" = "Onvoltooid aanvoegende wijs";
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user