Skip to content

Commit 5d6327e

Browse files
authored
Merge pull request #39 from cemolcay/feature/cemolcay-vector-assets
Update vector assets
2 parents 070b5b2 + f65821e commit 5d6327e

File tree

28 files changed

+133
-129
lines changed

28 files changed

+133
-129
lines changed

Keyboard/DefaultKeyboard/CustomKeyboard.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,23 +304,23 @@ public class CustomKeyboard: UIView, KeyboardLayoutDelegate {
304304
keyboardLayoutState = .Symbols
305305

306306
// Update shift state
307-
case .Shift:
307+
case .ShiftOff:
308308
if shiftToggleTimer == nil {
309309
keyboardLayoutState = .Letters(shiftState: .Once)
310310
startShiftToggleTimer()
311311
} else {
312312
keyboardLayoutState = .Letters(shiftState: .On)
313313
invalidateShiftToggleTimer()
314314
}
315-
case .ShiftToggledOnce:
315+
case .ShiftOnce:
316316
if shiftToggleTimer == nil {
317317
keyboardLayoutState = .Letters(shiftState: .Off)
318318
startShiftToggleTimer()
319319
} else {
320320
keyboardLayoutState = .Letters(shiftState: .On)
321321
invalidateShiftToggleTimer()
322322
}
323-
case .ShiftToggled:
323+
case .ShiftOn:
324324
if shiftToggleTimer == nil {
325325
keyboardLayoutState = .Letters(shiftState: .Off)
326326
}

Keyboard/DefaultKeyboard/CustomKeyboardLayout.swift

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ public enum CustomKeyboardIdentifier: String {
6969
case Numbers = "Numbers"
7070
case Letters = "Letters"
7171
case Symbols = "Symbols"
72-
case Shift = "Shift"
73-
case ShiftToggled = "ShiftToggled"
74-
case ShiftToggledOnce = "ShiftToggledOnce"
72+
case ShiftOff = "ShiftOff"
73+
case ShiftOn = "ShiftOn"
74+
case ShiftOnce = "ShiftOnce"
7575
}
7676

7777
// MARK: - CustomKeyboardLayout
@@ -120,12 +120,12 @@ public class CustomKeyboardLayout {
120120
characters: [
121121
KeyboardButton(
122122
type: .Image(UIImage(
123-
named: "shiftToggledOnce",
123+
named: "ShiftOnce",
124124
inBundle: NSBundle(forClass: CustomKeyboard.self),
125125
compatibleWithTraitCollection: nil)),
126126
style: CustomKeyboardShiftButtonStyle,
127127
width: .Relative(percent: 0.115),
128-
identifier: CustomKeyboardIdentifier.ShiftToggledOnce.rawValue),
128+
identifier: CustomKeyboardIdentifier.ShiftOnce.rawValue),
129129
KeyboardRow(
130130
style: CustomKeyboardChildRowStyle,
131131
characters: [
@@ -140,7 +140,7 @@ public class CustomKeyboardLayout {
140140
),
141141
KeyboardButton(
142142
type: .Image(UIImage(
143-
named: "backspace",
143+
named: "Backspace",
144144
inBundle: NSBundle(forClass: CustomKeyboard.self),
145145
compatibleWithTraitCollection: nil)),
146146
style: CustomKeyboardBackspaceButtonStyle,
@@ -158,7 +158,7 @@ public class CustomKeyboardLayout {
158158
identifier: CustomKeyboardIdentifier.Numbers.rawValue),
159159
KeyboardButton(
160160
type: .Image(UIImage(
161-
named: "globe",
161+
named: "Globe",
162162
inBundle: NSBundle(forClass: CustomKeyboard.self),
163163
compatibleWithTraitCollection: nil)),
164164
style: CustomKeyboardGlobeButtonStyle,
@@ -215,12 +215,12 @@ public class CustomKeyboardLayout {
215215
characters: [
216216
KeyboardButton(
217217
type: .Image(UIImage(
218-
named: "shiftToggled",
218+
named: "ShiftOn",
219219
inBundle: NSBundle(forClass: CustomKeyboard.self),
220220
compatibleWithTraitCollection: nil)),
221221
style: CustomKeyboardShiftButtonStyle,
222222
width: .Relative(percent: 0.115),
223-
identifier: CustomKeyboardIdentifier.ShiftToggled.rawValue),
223+
identifier: CustomKeyboardIdentifier.ShiftOn.rawValue),
224224
KeyboardRow(
225225
style: CustomKeyboardChildRowStyle,
226226
characters: [
@@ -235,7 +235,7 @@ public class CustomKeyboardLayout {
235235
),
236236
KeyboardButton(
237237
type: .Image(UIImage(
238-
named: "backspace",
238+
named: "Backspace",
239239
inBundle: NSBundle(forClass: CustomKeyboard.self),
240240
compatibleWithTraitCollection: nil)),
241241
style: CustomKeyboardBackspaceButtonStyle,
@@ -253,7 +253,7 @@ public class CustomKeyboardLayout {
253253
identifier: CustomKeyboardIdentifier.Numbers.rawValue),
254254
KeyboardButton(
255255
type: .Image(UIImage(
256-
named: "globe",
256+
named: "Globe",
257257
inBundle: NSBundle(forClass: CustomKeyboard.self),
258258
compatibleWithTraitCollection: nil)),
259259
style: CustomKeyboardGlobeButtonStyle,
@@ -310,12 +310,12 @@ public class CustomKeyboardLayout {
310310
characters: [
311311
KeyboardButton(
312312
type: .Image(UIImage(
313-
named: "shift",
313+
named: "ShiftOff",
314314
inBundle: NSBundle(forClass: CustomKeyboard.self),
315315
compatibleWithTraitCollection: nil)),
316316
style: CustomKeyboardShiftButtonStyle,
317317
width: .Relative(percent: 0.115),
318-
identifier: CustomKeyboardIdentifier.Shift.rawValue),
318+
identifier: CustomKeyboardIdentifier.ShiftOff.rawValue),
319319
KeyboardRow(
320320
style: CustomKeyboardChildRowStyle,
321321
characters: [
@@ -330,7 +330,7 @@ public class CustomKeyboardLayout {
330330
),
331331
KeyboardButton(
332332
type: .Image(UIImage(
333-
named: "backspace",
333+
named: "Backspace",
334334
inBundle: NSBundle(forClass: CustomKeyboard.self),
335335
compatibleWithTraitCollection: nil)),
336336
style: CustomKeyboardBackspaceButtonStyle,
@@ -348,7 +348,7 @@ public class CustomKeyboardLayout {
348348
identifier: CustomKeyboardIdentifier.Numbers.rawValue),
349349
KeyboardButton(
350350
type: .Image(UIImage(
351-
named: "globe",
351+
named: "Globe",
352352
inBundle: NSBundle(forClass: CustomKeyboard.self),
353353
compatibleWithTraitCollection: nil)),
354354
style: CustomKeyboardGlobeButtonStyle,
@@ -421,7 +421,7 @@ public class CustomKeyboardLayout {
421421
),
422422
KeyboardButton(
423423
type: .Image(UIImage(
424-
named: "backspace",
424+
named: "Backspace",
425425
inBundle: NSBundle(forClass: CustomKeyboard.self),
426426
compatibleWithTraitCollection: nil)),
427427
style: CustomKeyboardBackspaceButtonStyle,
@@ -439,7 +439,7 @@ public class CustomKeyboardLayout {
439439
identifier: CustomKeyboardIdentifier.Letters.rawValue),
440440
KeyboardButton(
441441
type: .Image(UIImage(
442-
named: "globe",
442+
named: "Globe",
443443
inBundle: NSBundle(forClass: CustomKeyboard.self),
444444
compatibleWithTraitCollection: nil)),
445445
style: CustomKeyboardGlobeButtonStyle,
@@ -512,7 +512,7 @@ public class CustomKeyboardLayout {
512512
),
513513
KeyboardButton(
514514
type: .Image(UIImage(
515-
named: "backspace",
515+
named: "Backspace",
516516
inBundle: NSBundle(forClass: CustomKeyboard.self),
517517
compatibleWithTraitCollection: nil)),
518518
style: CustomKeyboardBackspaceButtonStyle,
@@ -530,7 +530,7 @@ public class CustomKeyboardLayout {
530530
identifier: CustomKeyboardIdentifier.Letters.rawValue),
531531
KeyboardButton(
532532
type: .Image(UIImage(
533-
named: "globe",
533+
named: "Globe",
534534
inBundle: NSBundle(forClass: CustomKeyboard.self),
535535
compatibleWithTraitCollection: nil)),
536536
style: CustomKeyboardGlobeButtonStyle,

Keyboard/KeyboardLayoutEngine/KeyboardButton.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public struct KeyboardButtonStyle {
4646

4747
// Image
4848
public var imageSize: CGFloat?
49+
public var tintColor: UIColor
4950

5051
// KeyPop
5152
public var keyPopType: KeyPopType?
@@ -68,6 +69,7 @@ public struct KeyboardButtonStyle {
6869
font: UIFont? = nil,
6970
textOffsetY: CGFloat? = nil,
7071
imageSize: CGFloat? = nil,
72+
tintColor: UIColor = UIColor.blackColor(),
7173
keyPopType: KeyPopType? = nil,
7274
keyPopWidthMultiplier: CGFloat? = nil,
7375
keyPopHeightMultiplier: CGFloat? = nil,
@@ -86,6 +88,7 @@ public struct KeyboardButtonStyle {
8688
self.font = font ?? UIFont.systemFontOfSize(21)
8789
self.textOffsetY = textOffsetY ?? 0
8890
self.imageSize = imageSize
91+
self.tintColor = tintColor
8992
self.keyPopType = keyPopType
9093
self.keyPopWidthMultiplier = keyPopWidthMultiplier ?? 1.5
9194
self.keyPopHeightMultiplier = keyPopHeightMultiplier ?? 1.1
@@ -180,6 +183,7 @@ public class KeyboardButton: UIView {
180183
case .Image(let image):
181184
imageView = UIImageView(image: image)
182185
imageView?.contentMode = .ScaleAspectFit
186+
imageView?.tintColor = style.tintColor
183187
addSubview(imageView!)
184188
}
185189
}
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "Backspace.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template"
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "Emoji.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template"
14+
}
15+
}
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "Globe.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template"
14+
}
15+
}
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "ShiftOff.pdf"
6+
}
7+
],
8+
"info" : {
9+
"version" : 1,
10+
"author" : "xcode"
11+
},
12+
"properties" : {
13+
"template-rendering-intent" : "template"
14+
}
15+
}

0 commit comments

Comments
 (0)