-
Notifications
You must be signed in to change notification settings - Fork 118
/
TestViewController.swift
executable file
·53 lines (41 loc) · 1.54 KB
/
TestViewController.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Created by Aleksey Mikhailov on 23/06/2019.
// Copyright © 2019 IceRock Development. All rights reserved.
//
import UIKit
import MultiPlatformLibrary
class TestViewController: UIViewController {
@IBOutlet private var imageView: UIImageView!
@IBOutlet private var textView: UITextView!
@IBOutlet private var stringDescTextView: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
let testing = Testing()
let drawable = testing.getDrawable()
let strings = testing.getStrings()
imageView.image = drawable.toUIImage()
let textColor = MR.colors().textColor.color
textView.text = strings.map { $0.localized() }.joined(separator: "\n")
textView.font = testing.getFontTtf1().uiFont(withSize: 14.0)
textView.textColor = textColor.toUIColor()
stringDescTextView.text = testing.getStringDesc().localized()
stringDescTextView.font = testing.getFontTtf2().uiFont(withSize: 14.0)
[
testing.getTextFile(),
testing.getJsonFile(),
testing.getNestedJsonFile()
].map { $0.readText() }
.forEach { print($0) }
testing.getTextsFromAssets().map { $0.readText() }
.forEach { print($0) }
}
}
class LanguageTableViewController: UITableViewController {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if(segue.identifier == "") {
Testing().locale(lang: nil)
} else {
Testing().locale(lang: segue.identifier)
}
}
}