Skip to content

Commit

Permalink
Swift 5, Xcode 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor-by committed Apr 6, 2019
1 parent 9e972bb commit b92d9fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pod/PinCodeTextField.swift
Expand Up @@ -198,7 +198,7 @@ import UIKit
private func updateLabels() {
let textHelper = TextHelper(text: text, placeholder: placeholderText, isSecure: isSecureTextEntry)
for label in labels {
let index = labels.index(of: label) ?? 0
let index = labels.firstIndex(of: label) ?? 0
let currentCharacter = textHelper.character(atIndex: index)
label.text = currentCharacter.map { String($0) }
label.font = font
Expand All @@ -209,7 +209,7 @@ import UIKit

private func updateUnderlines() {
for label in labels {
let index = labels.index(of: label) ?? 0
let index = labels.firstIndex(of: label) ?? 0
if (!highlightInputUnderline || !isInput(index)) && isPlaceholder(index) {
underlines[index].backgroundColor = underlineColor
}
Expand Down

0 comments on commit b92d9fb

Please sign in to comment.