Skip to content

Commit

Permalink
Add experimental RTranslation, RTranslationList and RealmStore
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Jan 29, 2016
1 parent 89ab173 commit d750a5f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ use_frameworks!


pod 'Alamofire', '~> 3.0'
pod 'RealmSwift'
8 changes: 8 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
PODS:
- Alamofire (3.1.5)
- Realm (0.97.0):
- Realm/Headers (= 0.97.0)
- Realm/Headers (0.97.0)
- RealmSwift (0.97.0):
- Realm (= 0.97.0)

DEPENDENCIES:
- Alamofire (~> 3.0)
- RealmSwift

SPEC CHECKSUMS:
Alamofire: 5f730ba29fd113b7ddd71c1e65d0c630acf5d7b0
Realm: b498a6fb9d288b171ff98d0e2d4384c295be8990
RealmSwift: d014810dec75c9a3f1a33926d2dabfed855c582c

COCOAPODS: 0.39.0
4 changes: 4 additions & 0 deletions woording-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
87095C6B1C5BC87B00F300B2 /* TranslationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87095C6A1C5BC87B00F300B2 /* TranslationCell.swift */; };
87095C6D1C5BCDA700F300B2 /* TranslationList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87095C6C1C5BCDA700F300B2 /* TranslationList.swift */; };
87095C6F1C5BD88200F300B2 /* TranslationListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87095C6E1C5BD88200F300B2 /* TranslationListCell.swift */; };
874A9DE91C5BFC9000075032 /* RealmStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874A9DE81C5BFC9000075032 /* RealmStore.swift */; };
876955BB1C419CFC00178A52 /* AccountCredentials.plist in Resources */ = {isa = PBXBuildFile; fileRef = 876955BA1C419CFC00178A52 /* AccountCredentials.plist */; };
876955BD1C419DCD00178A52 /* AccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 876955BC1C419DCD00178A52 /* AccountManager.swift */; };
877E20941C5B772E00AEBCCE /* Translation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877E20931C5B772E00AEBCCE /* Translation.swift */; };
Expand Down Expand Up @@ -53,6 +54,7 @@
87095C6A1C5BC87B00F300B2 /* TranslationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslationCell.swift; sourceTree = "<group>"; };
87095C6C1C5BCDA700F300B2 /* TranslationList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslationList.swift; sourceTree = "<group>"; };
87095C6E1C5BD88200F300B2 /* TranslationListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslationListCell.swift; sourceTree = "<group>"; };
874A9DE81C5BFC9000075032 /* RealmStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmStore.swift; sourceTree = "<group>"; };
876955BA1C419CFC00178A52 /* AccountCredentials.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AccountCredentials.plist; sourceTree = "<group>"; };
876955BC1C419DCD00178A52 /* AccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountManager.swift; sourceTree = "<group>"; };
877E20931C5B772E00AEBCCE /* Translation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Translation.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -218,6 +220,7 @@
children = (
876955BA1C419CFC00178A52 /* AccountCredentials.plist */,
876955BC1C419DCD00178A52 /* AccountManager.swift */,
874A9DE81C5BFC9000075032 /* RealmStore.swift */,
D034510E1C5B954B002F4345 /* Store.swift */,
);
name = Store;
Expand Down Expand Up @@ -426,6 +429,7 @@
D034510F1C5B954B002F4345 /* Store.swift in Sources */,
877E20941C5B772E00AEBCCE /* Translation.swift in Sources */,
87AE060F1C41610E006C27E4 /* DetailViewController.swift in Sources */,
874A9DE91C5BFC9000075032 /* RealmStore.swift in Sources */,
87095C6F1C5BD88200F300B2 /* TranslationListCell.swift in Sources */,
87AE060D1C41610E006C27E4 /* MasterViewController.swift in Sources */,
87AE060B1C41610E006C27E4 /* AppDelegate.swift in Sources */,
Expand Down
9 changes: 4 additions & 5 deletions woording-ios/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,24 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Word 1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="85Z-lK-YQZ" userLabel="Word1">
<rect key="frame" x="8" y="8" width="292" height="21"/>
<rect key="frame" x="8" y="14" width="292" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Word 2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xyc-Wy-KGV" userLabel="Word2">
<rect key="frame" x="300" y="8" width="292" height="21"/>
<rect key="frame" x="300" y="11" width="292" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="bottomMargin" secondItem="85Z-lK-YQZ" secondAttribute="bottom" constant="6" id="2Kh-xW-wUJ"/>
<constraint firstAttribute="topMargin" secondItem="85Z-lK-YQZ" secondAttribute="top" id="FhE-Of-Q5J"/>
<constraint firstAttribute="bottomMargin" secondItem="xyc-Wy-KGV" secondAttribute="bottom" constant="6" id="HCd-Jy-ZBF"/>
<constraint firstItem="85Z-lK-YQZ" firstAttribute="leading" secondItem="icv-Ul-XCF" secondAttribute="leadingMargin" id="VVX-nB-9kD"/>
<constraint firstAttribute="trailingMargin" secondItem="xyc-Wy-KGV" secondAttribute="trailing" id="X0h-On-ZTc"/>
<constraint firstItem="85Z-lK-YQZ" firstAttribute="width" secondItem="xyc-Wy-KGV" secondAttribute="width" id="nAq-vO-7sS"/>
<constraint firstAttribute="topMargin" secondItem="xyc-Wy-KGV" secondAttribute="top" id="thd-B5-tTv"/>
<constraint firstItem="xyc-Wy-KGV" firstAttribute="centerY" secondItem="icv-Ul-XCF" secondAttribute="centerY" id="qKs-oz-HYM"/>
<constraint firstItem="85Z-lK-YQZ" firstAttribute="centerY" secondItem="icv-Ul-XCF" secondAttribute="centerY" id="sfc-8L-50H"/>
<constraint firstItem="xyc-Wy-KGV" firstAttribute="leading" secondItem="85Z-lK-YQZ" secondAttribute="trailing" id="v44-ce-QwS"/>
</constraints>
</tableViewCellContentView>
Expand Down
22 changes: 22 additions & 0 deletions woording-ios/RealmStore.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// RealmStore.swift
// woording-ios
//
// Created by Cor Pruijs on 29-01-16.
// Copyright © 2016 Woording. All rights reserved.
//

import Foundation
import RealmSwift

class RTranslation: Object {
dynamic var word1Text = ""
dynamic var word2Text = ""
}

class RTranslationList: Object {
dynamic var name = ""
dynamic var language1Code = ""
dynamic var language2Code = ""
let translations = List<RTranslation>()
}

0 comments on commit d750a5f

Please sign in to comment.