Files
espagram/Espagram/EspagramAddWordToLessonViewController.m
Abel Fokkinga 3013ee52c4 Version 1.1
- Added localised descriptions for all the tenses.
- After selecting a lesson, you will get a screen where you can see both the words in the lesson or start a multiple choice test.
- Lay-out fixes
- UI improvements
2013-01-02 17:33:00 -02:00

52 lines
1.5 KiB
Objective-C

//
// EspagramAddWordToLessonViewController.m
// Espagram
//
// Created by Abel Fokkinga on 11/14/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
#import "EspagramAddWordToLessonViewController.h"
@interface EspagramAddWordToLessonViewController ()
@end
@implementation EspagramAddWordToLessonViewController
@synthesize dataSource = _dataSource;
@synthesize wordLabel = _wordLabel;
@synthesize meaningLabel = _meaningLabel;
@synthesize wordInputText = _wordInputText;
@synthesize meaningInputText = _meaningInputText;
@synthesize addButton = _addButton;
@synthesize cancelButton = _cancelButton;
- (IBAction)editingDidEnd {
[self resignFirstResponder];
}
- (IBAction)addButtonPressed:(id)sender {
[self.dataSource addWord: self.wordInputText.text withMeaning:self.meaningInputText.text];
}
- (IBAction)cancelButtonPressed:(id)sender {
[self.dataSource cancelAddingWord];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
self.wordLabel.text = NSLocalizedString(@"New verb", @"Adding a new verb to a lesson");
self.meaningLabel.text = NSLocalizedString(@"Meaning", @"Adding the meaning of a new verb being added to a lesson");
[self.addButton setTitle:NSLocalizedString(@"Add Verb", @"Add button when adding a verb to a lesson") forState:UIControlStateNormal];
[self.cancelButton setTitle:NSLocalizedString(@"Cancel Verb",@"Cancel button to cancel adding a verb to a lesson") forState:UIControlStateNormal];
}
@end